Commit 3eea6fff authored by Nikita Nemkin's avatar Nikita Nemkin

Changed bint representation in autodoc signatures from 'int' to 'bool'.

parent bb08f812
...@@ -1665,6 +1665,14 @@ class CBIntType(CIntType): ...@@ -1665,6 +1665,14 @@ class CBIntType(CIntType):
from_py_function = "__Pyx_PyObject_IsTrue" from_py_function = "__Pyx_PyObject_IsTrue"
exception_check = 1 # for C++ bool 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): def __repr__(self):
return "<CNumericType bint>" return "<CNumericType bint>"
......
...@@ -125,6 +125,9 @@ __doc__ = ur""" ...@@ -125,6 +125,9 @@ __doc__ = ur"""
>>> print (f_si.__doc__) >>> print (f_si.__doc__)
f_si(signed int i) -> signed int f_si(signed int i) -> signed int
>>> print (f_bint.__doc__)
f_bint(bool i) -> bool
>>> print (f_l.__doc__) >>> print (f_l.__doc__)
f_l(long l) -> long f_l(long l) -> long
...@@ -318,6 +321,9 @@ cpdef unsigned int f_ui(unsigned int i): ...@@ -318,6 +321,9 @@ cpdef unsigned int f_ui(unsigned int i):
cpdef signed int f_si(signed int i): cpdef signed int f_si(signed int i):
return i return i
cpdef bint f_bint(bint i):
return i
cpdef long f_l(long l): cpdef long f_l(long l):
return l return l
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment