mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2025-02-06 03:39:56 +00:00
commit
8e5643b04d
@ -4,7 +4,7 @@
|
||||
[package]
|
||||
name = "rabbitizer"
|
||||
# Version should be synced with include/common/RabbitizerVersion.h
|
||||
version = "1.7.6"
|
||||
version = "1.7.7"
|
||||
edition = "2021"
|
||||
authors = ["Anghelo Carvajal <angheloalf95@gmail.com>"]
|
||||
description = "MIPS instruction decoder"
|
||||
|
@ -14,7 +14,7 @@ extern "C" {
|
||||
// Header version
|
||||
#define RAB_VERSION_MAJOR 1
|
||||
#define RAB_VERSION_MINOR 7
|
||||
#define RAB_VERSION_PATCH 6
|
||||
#define RAB_VERSION_PATCH 7
|
||||
|
||||
#define RAB_VERSION_STR RAB_STRINGIFY(RAB_VERSION_MAJOR) "." RAB_STRINGIFY(RAB_VERSION_MINOR) "." RAB_STRINGIFY(RAB_VERSION_PATCH)
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
[project]
|
||||
name = "rabbitizer"
|
||||
# Version should be synced with include/common/RabbitizerVersion.h
|
||||
version = "1.7.6"
|
||||
version = "1.7.7"
|
||||
description = "MIPS instruction decoder"
|
||||
# license = "MIT"
|
||||
readme = "README.md"
|
||||
|
@ -20,5 +20,7 @@ class Enum:
|
||||
def __gt__(self, __o: object) -> bool: ...
|
||||
def __ge__(self, __o: object) -> bool: ...
|
||||
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
@ -91,15 +91,21 @@ static PyGetSetDef rabbitizer_type_Enum_getsetters[] = {
|
||||
};
|
||||
|
||||
|
||||
// Crappy hash
|
||||
Py_hash_t rabbitizer_type_Enum_hash(PyRabbitizerEnum *self) {
|
||||
Py_hash_t hash = PyObject_Hash(self->enumType);
|
||||
PyObject *tuple = PyTuple_Pack(2, self->enumType, PyLong_FromLong(self->value));
|
||||
Py_hash_t hash;
|
||||
|
||||
if (tuple == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
hash = PyObject_Hash(tuple);
|
||||
|
||||
if (hash == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return hash + self->value;
|
||||
return hash;
|
||||
}
|
||||
|
||||
// Checks for the 6 basic comparisons (==, !=, <, <=, >, >=)
|
||||
|
Loading…
x
Reference in New Issue
Block a user