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
Kirill Smelkov
cython
Commits
31aa9068
Commit
31aa9068
authored
Nov 07, 2007
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docstrings for special methods and cpdef functions
parent
bbda6f56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-2
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+2
-1
No files found.
Cython/Compiler/Nodes.py
View file @
31aa9068
...
...
@@ -783,7 +783,7 @@ class CFuncDefNode(FuncDefNode):
args
=
self
.
declarator
.
args
,
star_arg
=
None
,
starstar_arg
=
None
,
doc
=
None
,
#
self.doc,
doc
=
self
.
doc
,
body
=
py_func_body
)
self
.
py_func
.
analyse_declarations
(
env
)
# Reset scope entry the above cfunction
...
...
@@ -1026,7 +1026,7 @@ class DefNode(FuncDefNode):
Naming
.
pymethdef_prefix
+
prefix
+
name
if
not
Options
.
docstrings
:
self
.
entry
.
doc
=
None
el
if
not
entry
.
is_special
:
el
se
:
if
Options
.
embed_pos_in_docstring
:
entry
.
doc
=
'File: %s (starting at line %s)'
%
relative_position
(
self
.
pos
)
if
not
self
.
doc
is
None
:
...
...
Cython/Compiler/Parsing.py
View file @
31aa9068
...
...
@@ -1862,12 +1862,13 @@ def p_c_func_or_var_declaration(s, level, pos, visibility = 'private', api = 0,
if
s
.
sy
==
':'
:
if
level
not
in
(
'module'
,
'c_class'
):
s
.
error
(
"C function definition not allowed here"
)
suite
=
p_suite
(
s
,
'function'
,
with_pseudo
_doc
=
1
)
doc
,
suite
=
p_suite
(
s
,
'function'
,
with
_doc
=
1
)
result
=
Nodes
.
CFuncDefNode
(
pos
,
visibility
=
visibility
,
base_type
=
base_type
,
declarator
=
declarator
,
body
=
suite
,
doc
=
doc
,
modifiers
=
modifiers
,
api
=
api
,
overridable
=
overridable
)
...
...
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