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
a990eae9
Commit
a990eae9
authored
Aug 22, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more cleanup
parent
dfaa72eb
Changes
1
Show 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 @
a990eae9
...
@@ -1805,13 +1805,14 @@ class DefNode(FuncDefNode):
...
@@ -1805,13 +1805,14 @@ class DefNode(FuncDefNode):
# raise an error if not all keywords were read
# raise an error if not all keywords were read
code
.
putln
(
'if (unlikely(kw_args > 0)) {'
)
code
.
putln
(
'if (unlikely(kw_args > 0)) {'
)
code
.
put
(
'if (!__Pyx_CheckKeywords(%s, "%s", %s)) '
%
(
# __Pyx_CheckKeywords() this does more than strictly
# necessary, but this is not performance critical at all
code
.
put
(
'__Pyx_CheckKeywords(%s, "%s", %s); '
%
(
Naming
.
kwds_cname
,
self
.
name
.
utf8encode
(),
Naming
.
kwdlist_cname
))
Naming
.
kwds_cname
,
self
.
name
.
utf8encode
(),
Naming
.
kwdlist_cname
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
# convert arg values to their final type and assign them
# convert arg values to their final type and assign them
default_seen
=
False
for
i
,
arg
in
enumerate
(
tuple
(
positional_args
)
+
tuple
(
kw_only_args
)):
for
i
,
arg
in
enumerate
(
tuple
(
positional_args
)
+
tuple
(
kw_only_args
)):
if
arg
.
default
:
if
arg
.
default
:
code
.
putln
(
"if (values[%d]) {"
%
i
)
code
.
putln
(
"if (values[%d]) {"
%
i
)
...
@@ -1827,7 +1828,7 @@ class DefNode(FuncDefNode):
...
@@ -1827,7 +1828,7 @@ class DefNode(FuncDefNode):
required_arg
=
arg
required_arg
=
arg
break
break
code
.
putln
(
'} else {'
)
code
.
putln
(
'} else {'
)
code
.
put
ln
(
'__Pyx_RaiseKeywordRequired("%s", "%s");
'
%
(
code
.
put
(
'__Pyx_RaiseKeywordRequired("%s", "%s");
'
%
(
self
.
name
.
utf8encode
(),
required_arg
.
name
.
utf8encode
()))
self
.
name
.
utf8encode
(),
required_arg
.
name
.
utf8encode
()))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
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