]> granicus.if.org Git - clang/commitdiff
[clang.py] Return bool from Cursor.__eq__
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 5 Mar 2012 00:42:15 +0000 (00:42 +0000)
committerGregory Szorc <gregory.szorc@gmail.com>
Mon, 5 Mar 2012 00:42:15 +0000 (00:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152011 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/python/clang/cindex.py

index c93d35c57b9aa9b1ec784bae6a98985bcd7d1d76..3b1e751ec0d0f8c26bb565a6d105a8345d40c259 100644 (file)
@@ -893,7 +893,7 @@ class Cursor(Structure):
         return Cursor_eq(self, other)
 
     def __ne__(self, other):
-        return not Cursor_eq(self, other)
+        return not self.__eq__(other)
 
     def is_definition(self):
         """
@@ -1876,7 +1876,7 @@ Cursor_def.errcheck = Cursor.from_result
 
 Cursor_eq = lib.clang_equalCursors
 Cursor_eq.argtypes = [Cursor, Cursor]
-Cursor_eq.restype = c_uint
+Cursor_eq.restype = bool
 
 Cursor_hash = lib.clang_hashCursor
 Cursor_hash.argtypes = [Cursor]