diff options
Diffstat (limited to 'python/types.py')
| -rw-r--r-- | python/types.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/types.py b/python/types.py index 418c4e4f..f87cc37f 100644 --- a/python/types.py +++ b/python/types.py @@ -510,6 +510,9 @@ class TypeBuilder: def handle(self) -> core.BNTypeHandle: return self.immutable_copy().handle + def __hash__(self): + return hash(ctypes.addressof(self.handle.contents)) + def _to_core_struct(self) -> core.BNTypeWithConfidence: type_conf = core.BNTypeWithConfidence() type_conf.type = self.handle @@ -1544,6 +1547,9 @@ class Type: return NotImplemented return core.BNTypesNotEqual(self._handle, other._handle) + def __hash__(self): + return hash(ctypes.addressof(self.handle.contents)) + @property def handle(self): return self._handle |
