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
fbf400b5
Commit
fbf400b5
authored
Mar 24, 2020
by
Alex Henrie
Committed by
GitHub
Mar 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark missing argument errors in argument parsing code as unlikely (GH-3428)
parent
606b4f44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-2
No files found.
Cython/Compiler/Nodes.py
View file @
fbf400b5
...
@@ -3790,14 +3790,14 @@ class DefNodeWrapper(FuncDefNode):
...
@@ -3790,14 +3790,14 @@ class DefNodeWrapper(FuncDefNode):
compare
=
'!='
compare
=
'!='
else
:
else
:
compare
=
'<'
compare
=
'<'
code
.
putln
(
'} else if (
%s %s %d
) {'
%
(
code
.
putln
(
'} else if (
unlikely(%s %s %d)
) {'
%
(
Naming
.
nargs_cname
,
compare
,
min_positional_args
))
Naming
.
nargs_cname
,
compare
,
min_positional_args
))
code
.
put_goto
(
argtuple_error_label
)
code
.
put_goto
(
argtuple_error_label
)
if
self
.
num_required_kw_args
:
if
self
.
num_required_kw_args
:
# pure error case: keywords required but not passed
# pure error case: keywords required but not passed
if
max_positional_args
>
min_positional_args
and
not
self
.
star_arg
:
if
max_positional_args
>
min_positional_args
and
not
self
.
star_arg
:
code
.
putln
(
'} else if (
%s > %d
) {'
%
(
code
.
putln
(
'} else if (
unlikely(%s > %d)
) {'
%
(
Naming
.
nargs_cname
,
max_positional_args
))
Naming
.
nargs_cname
,
max_positional_args
))
code
.
put_goto
(
argtuple_error_label
)
code
.
put_goto
(
argtuple_error_label
)
code
.
putln
(
'} else {'
)
code
.
putln
(
'} else {'
)
...
...
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