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
866c3e8a
Commit
866c3e8a
authored
Jul 10, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add semicolon for fallthrough statements.
Resolves note at #1765.
parent
3ea17b70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-3
No files found.
Cython/Compiler/Nodes.py
View file @
866c3e8a
...
@@ -3623,7 +3623,7 @@ class DefNodeWrapper(FuncDefNode):
...
@@ -3623,7 +3623,7 @@ class DefNodeWrapper(FuncDefNode):
if
i
>=
min_positional_args
-
1
:
if
i
>=
min_positional_args
-
1
:
code
.
put
(
'case %2d: '
%
(
i
+
1
))
code
.
put
(
'case %2d: '
%
(
i
+
1
))
code
.
putln
(
"values[%d] = PyTuple_GET_ITEM(%s, %d);"
%
(
i
,
Naming
.
args_cname
,
i
))
code
.
putln
(
"values[%d] = PyTuple_GET_ITEM(%s, %d);"
%
(
i
,
Naming
.
args_cname
,
i
))
code
.
putln
(
'CYTHON_FALLTHROUGH'
)
code
.
putln
(
'CYTHON_FALLTHROUGH
;
'
)
if
min_positional_args
==
0
:
if
min_positional_args
==
0
:
code
.
put
(
'case 0: '
)
code
.
put
(
'case 0: '
)
code
.
putln
(
'break;'
)
code
.
putln
(
'break;'
)
...
@@ -3750,7 +3750,7 @@ class DefNodeWrapper(FuncDefNode):
...
@@ -3750,7 +3750,7 @@ class DefNodeWrapper(FuncDefNode):
code
.
put
(
'case %2d: '
%
(
i
+
1
))
code
.
put
(
'case %2d: '
%
(
i
+
1
))
code
.
putln
(
"values[%d] = PyTuple_GET_ITEM(%s, %d);"
%
(
code
.
putln
(
"values[%d] = PyTuple_GET_ITEM(%s, %d);"
%
(
i
,
Naming
.
args_cname
,
i
))
i
,
Naming
.
args_cname
,
i
))
code
.
putln
(
'CYTHON_FALLTHROUGH'
)
code
.
putln
(
'CYTHON_FALLTHROUGH
;
'
)
code
.
putln
(
'case 0: break;'
)
code
.
putln
(
'case 0: break;'
)
if
not
self
.
star_arg
:
if
not
self
.
star_arg
:
code
.
put
(
'default: '
)
# more arguments than allowed
code
.
put
(
'default: '
)
# more arguments than allowed
...
@@ -3820,7 +3820,7 @@ class DefNodeWrapper(FuncDefNode):
...
@@ -3820,7 +3820,7 @@ class DefNodeWrapper(FuncDefNode):
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
if
max_positional_args
>
0
and
i
<
last_required_arg
:
if
max_positional_args
>
0
and
i
<
last_required_arg
:
code
.
putln
(
'CYTHON_FALLTHROUGH'
)
code
.
putln
(
'CYTHON_FALLTHROUGH
;
'
)
if
max_positional_args
>
0
:
if
max_positional_args
>
0
:
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
...
...
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