From 374611c46ff39e7cb0539e0ce61cc8b649739e04 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Fri, 13 Mar 2020 11:53:25 -0400 Subject: fixing several broken __hash__ methods --- python/binaryview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index 5fb1c6fa..5444f45b 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -874,7 +874,7 @@ class Segment(object): return ctypes.addressof(self.handle.contents) != ctypes.addressof(other.handle.contents) def __hash__(self): - return hash(self.handle.contents) + return hash(ctypes.addressof(self.handle.contents)) def __len__(self): return core.BNSegmentGetLength(self.handle) @@ -948,7 +948,7 @@ class Section(object): return ctypes.addressof(self.handle.contents) != ctypes.addressof(other.handle.contents) def __hash__(self): - return hash(self.handle.contents) + return hash(ctypes.addressof(self.handle.contents)) def __len__(self): return core.BNSectionGetLength(self.handle) @@ -1048,7 +1048,7 @@ class TagType(object): return ctypes.addressof(self.handle.contents) != ctypes.addressof(other.handle.contents) def __hash__(self): - return hash(self.handle.contents) + return hash(ctypes.addressof(self.handle.contents)) def __repr__(self): return "" % (self.name, self.icon) -- cgit v1.3.1