summaryrefslogtreecommitdiffstats
path: root/tools/memory_inspector
diff options
context:
space:
mode:
Diffstat (limited to 'tools/memory_inspector')
-rw-r--r--tools/memory_inspector/memory_inspector/core/memory_map.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/memory_inspector/memory_inspector/core/memory_map.py b/tools/memory_inspector/memory_inspector/core/memory_map.py
index fe71608..1c27fbb 100644
--- a/tools/memory_inspector/memory_inspector/core/memory_map.py
+++ b/tools/memory_inspector/memory_inspector/core/memory_map.py
@@ -94,9 +94,9 @@ class MapEntry(object):
def __cmp__(self, other):
"""Comparison operator required for bisect."""
if isinstance(other, MapEntry):
- return self.start - other.start
+ return self.start.__cmp__(other.start)
elif isinstance(other, (long, int)):
- return self.start - other
+ return self.start.__cmp__(other)
else:
raise Exception('Cannot compare with %s' % other.__class__)