summaryrefslogtreecommitdiff
path: root/python/filemetadata.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2017-03-05 13:12:01 -0500
committerPeter LaFosse <peter@vector35.com>2017-03-05 13:12:01 -0500
commitcf5997848b8819725315bd2c8dd8a04c70da3b63 (patch)
tree24d9360e3ccfaee361aca4d345072c142c386a41 /python/filemetadata.py
parenta0132eed82d28d4408a2475847e1804a157b3dc1 (diff)
parent27f1271083efb09efc6405f91be893ab38dad9a0 (diff)
Merginging with dev
Diffstat (limited to 'python/filemetadata.py')
-rw-r--r--python/filemetadata.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/filemetadata.py b/python/filemetadata.py
index f6593405..b489d5bb 100644
--- a/python/filemetadata.py
+++ b/python/filemetadata.py
@@ -93,6 +93,16 @@ class FileMetadata(object):
core.BNSetFileMetadataNavigationHandler(self.handle, None)
core.BNFreeFileMetadata(self.handle)
+ def __eq__(self, value):
+ if not isinstance(value, FileMetadata):
+ return False
+ return ctypes.addressof(self.handle.contents) == ctypes.addressof(value.handle.contents)
+
+ def __ne__(self, value):
+ if not isinstance(value, FileMetadata):
+ return True
+ return ctypes.addressof(self.handle.contents) != ctypes.addressof(value.handle.contents)
+
@classmethod
def _unregister(cls, f):
handle = ctypes.cast(f, ctypes.c_void_p)