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
fee5e490
Commit
fee5e490
authored
7 years ago
by
Robert Bradshaw
Committed by
GitHub
7 years ago
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
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 @
fee5e490
...
...
@@ -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'
]
...
...
This diff is collapsed.
Click to expand it.
tests/run/staticmethod.pyx
View file @
fee5e490
...
...
@@ -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
):
"""
...
...
This diff is collapsed.
Click to expand it.
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