Change == on StructSchema to return cbool
This commit is contained in:
@@ -809,7 +809,7 @@ cdef class _StructSchema:
|
|||||||
|
|
||||||
def __richcmp__(_StructSchema self, _StructSchema other, mode):
|
def __richcmp__(_StructSchema self, _StructSchema other, mode):
|
||||||
if mode == 2:
|
if mode == 2:
|
||||||
return bool(self.thisptr == other.thisptr)
|
return self.thisptr == other.thisptr
|
||||||
elif mode == 3:
|
elif mode == 3:
|
||||||
return not (self.thisptr == other.thisptr)
|
return not (self.thisptr == other.thisptr)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
|
|
||||||
Field getFieldByName(char * name)
|
Field getFieldByName(char * name)
|
||||||
|
|
||||||
int operator == (StructSchema)
|
cbool operator == (StructSchema)
|
||||||
|
|
||||||
cdef cppclass EnumSchema:
|
cdef cppclass EnumSchema:
|
||||||
cppclass Enumerant:
|
cppclass Enumerant:
|
||||||
|
|||||||
Reference in New Issue
Block a user