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
34ab4c7d
Commit
34ab4c7d
authored
Jun 29, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix C89 "code before declaration" issue.
parent
fa611206
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+4
-3
No files found.
Cython/Compiler/Nodes.py
View file @
34ab4c7d
...
@@ -4045,9 +4045,10 @@ class DefNodeWrapper(FuncDefNode):
...
@@ -4045,9 +4045,10 @@ class DefNodeWrapper(FuncDefNode):
# pos-only arguments from the number of positional arguments we got.
# pos-only arguments from the number of positional arguments we got.
# If we get a negative number then none of the keyword arguments were
# If we get a negative number then none of the keyword arguments were
# passed as positional args.
# passed as positional args.
code
.
putln
(
'Py_ssize_t kwd_pos_args = %s - %d;'
%
(
code
.
putln
(
'const Py_ssize_t kwd_pos_args = (unlikely(%s < %d)) ? 0 : %s - %d;'
%
(
Naming
.
nargs_cname
,
num_pos_only_args
))
Naming
.
nargs_cname
,
num_pos_only_args
,
code
.
putln
(
'if (unlikely(kwd_pos_args < 0)) kwd_pos_args = 0;'
)
Naming
.
nargs_cname
,
num_pos_only_args
,
))
elif
max_positional_args
>
0
:
elif
max_positional_args
>
0
:
code
.
putln
(
'const Py_ssize_t kwd_pos_args = %s;'
%
Naming
.
nargs_cname
)
code
.
putln
(
'const Py_ssize_t kwd_pos_args = %s;'
%
Naming
.
nargs_cname
)
...
...
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