from_py_function = "__Pyx_PyObject_IsTrue"
exception_check = 1 # for C++ bool
+ def declaration_code(self, entity_code,
+ for_display = 0, dll_linkage = None, pyrex = 0):
+ if pyrex or for_display:
+ base_code = 'bool'
+ else:
+ base_code = public_decl('int', dll_linkage)
+ return self.base_declaration_code(base_code, entity_code)
+
def __repr__(self):
return "<CNumericType bint>"
>>> print (f_si.__doc__)
f_si(signed int i) -> signed int
+ >>> print (f_bint.__doc__)
+ f_bint(bool i) -> bool
+
>>> print (f_l.__doc__)
f_l(long l) -> long
cpdef signed int f_si(signed int i):
return i
+cpdef bint f_bint(bint i):
+ return i
+
cpdef long f_l(long l):
return l