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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
fee5e490
Commit
fee5e490
authored
Jan 16, 2018
by
Robert Bradshaw
Committed by
GitHub
Jan 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2076 from jdemeyer/voidproto
C functions without args should be declared as f(void)
parents
5d3a1346
176b1cc4
Changes
2
Show 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 @
fee5e490
...
@@ -3190,7 +3190,10 @@ class DefNode(FuncDefNode):
...
@@ -3190,7 +3190,10 @@ class DefNode(FuncDefNode):
arg_code_list
.
append
(
arg_decl_code
(
self
.
star_arg
))
arg_code_list
.
append
(
arg_decl_code
(
self
.
star_arg
))
if
self
.
starstar_arg
:
if
self
.
starstar_arg
:
arg_code_list
.
append
(
arg_decl_code
(
self
.
starstar_arg
))
arg_code_list
.
append
(
arg_decl_code
(
self
.
starstar_arg
))
if
arg_code_list
:
arg_code
=
', '
.
join
(
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
)
dc
=
self
.
return_type
.
declaration_code
(
self
.
entry
.
pyfunc_cname
)
decls_code
=
code
.
globalstate
[
'decls'
]
decls_code
=
code
.
globalstate
[
'decls'
]
...
...
tests/run/staticmethod.pyx
View file @
fee5e490
...
@@ -139,6 +139,14 @@ cdef class ArgsKwargs(object):
...
@@ -139,6 +139,14 @@ cdef class ArgsKwargs(object):
"""
"""
return
args
+
tuple
(
sorted
(
kwargs
.
items
()))
return
args
+
tuple
(
sorted
(
kwargs
.
items
()))
@
staticmethod
def
no_args
():
"""
>>> ArgsKwargs().no_args()
OK!
"""
print
(
"OK!"
)
class
StaticmethodSubclass
(
staticmethod
):
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