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
176b1cc4
Commit
176b1cc4
authored
Jan 16, 2018
by
Jeroen Demeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C functions without args should be declared as f(void)
parent
5d3a1346
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+4
-1
tests/run/staticmethod.pyx
tests/run/staticmethod.pyx
+8
-0
No files found.
Cython/Compiler/Nodes.py
View file @
176b1cc4
...
...
@@ -3190,7 +3190,10 @@ class DefNode(FuncDefNode):
arg_code_list
.
append
(
arg_decl_code
(
self
.
star_arg
))
if
self
.
starstar_arg
:
arg_code_list
.
append
(
arg_decl_code
(
self
.
starstar_arg
))
arg_code
=
', '
.
join
(
arg_code_list
)
if
arg_code_list
:
arg_code
=
', '
.
join
(
arg_code_list
)
else
:
arg_code
=
'void'
# No arguments
dc
=
self
.
return_type
.
declaration_code
(
self
.
entry
.
pyfunc_cname
)
decls_code
=
code
.
globalstate
[
'decls'
]
...
...
tests/run/staticmethod.pyx
View file @
176b1cc4
...
...
@@ -139,6 +139,14 @@ cdef class ArgsKwargs(object):
"""
return
args
+
tuple
(
sorted
(
kwargs
.
items
()))
@
staticmethod
def
no_args
():
"""
>>> ArgsKwargs().no_args()
OK!
"""
print
(
"OK!"
)
class
StaticmethodSubclass
(
staticmethod
):
"""
...
...
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