X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..bca245acd4c03fd752d1a45f011ad495e60fe53d:/tools/lldbmacros/core/cvalue.py?ds=inline diff --git a/tools/lldbmacros/core/cvalue.py b/tools/lldbmacros/core/cvalue.py index e58c7752f..bcebeb495 100755 --- a/tools/lldbmacros/core/cvalue.py +++ b/tools/lldbmacros/core/cvalue.py @@ -49,7 +49,10 @@ class value(object): other = long(other) return me.__cmp__(other) if type(other) is value: - return int(self).__cmp__(int(other)) + try: + return int(self).__cmp__(int(other)) + except TypeError: # Try promoting to long + return long(self).__cmp__(long(other)) raise TypeError("Cannot compare value with type {}".format(type(other))) def __str__(self):