Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
3eea6fff
Commit
3eea6fff
authored
Apr 14, 2013
by
Nikita Nemkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed bint representation in autodoc signatures from 'int' to 'bool'.
parent
bb08f812
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+8
-0
tests/run/embedsignatures.pyx
tests/run/embedsignatures.pyx
+6
-0
No files found.
Cython/Compiler/PyrexTypes.py
View file @
3eea6fff
...
...
@@ -1665,6 +1665,14 @@ class CBIntType(CIntType):
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>"
...
...
tests/run/embedsignatures.pyx
View file @
3eea6fff
...
...
@@ -125,6 +125,9 @@ __doc__ = ur"""
>>> 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
...
...
@@ -318,6 +321,9 @@ cpdef unsigned int f_ui(unsigned int i):
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment