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
c976a7b0
Commit
c976a7b0
authored
Jun 14, 2019
by
gsamain
Committed by
Xavier Thompson
Aug 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix checks written about optional arguments when there is no one
parent
94f4d74d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+18
-17
No files found.
Cython/Compiler/ModuleNode.py
View file @
c976a7b0
...
...
@@ -1244,24 +1244,25 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
narg
.
type
.
is_cyp_class
:
code
.
putln
(
"%s(this->%s);"
%
(
op_lbda
(
narg
),
narg
.
cname
))
code
.
putln
(
"if (this->%s != NULL) {"
%
opt_arg_name
)
num_if
=
0
for
opt_idx
,
optarg
in
enumerate
(
func_type
.
args
[
narg_count
:]):
if
optarg
.
type
.
is_cyp_class
:
code
.
putln
(
"if (this->%s->%sn > %s) {"
%
(
opt_arg_name
,
Naming
.
pyrex_prefix
,
opt_idx
))
code
.
putln
(
"%s(this->%s->%s);"
%
(
op_lbda
(
optarg
),
opt_arg_name
,
func_type
.
opt_arg_cname
(
optarg
.
name
)
))
num_if
+=
1
for
_
in
range
(
num_if
):
if
opt_arg_count
:
code
.
putln
(
"if (this->%s != NULL) {"
%
opt_arg_name
)
num_if
=
0
for
opt_idx
,
optarg
in
enumerate
(
func_type
.
args
[
narg_count
:]):
if
optarg
.
type
.
is_cyp_class
:
code
.
putln
(
"if (this->%s->%sn > %s) {"
%
(
opt_arg_name
,
Naming
.
pyrex_prefix
,
opt_idx
))
code
.
putln
(
"%s(this->%s->%s);"
%
(
op_lbda
(
optarg
),
opt_arg_name
,
func_type
.
opt_arg_cname
(
optarg
.
name
)
))
num_if
+=
1
for
_
in
range
(
num_if
):
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
for
reifying_class_entry
in
entry
.
type
.
scope
.
reifying_entries
:
reified_function_entry
=
reifying_class_entry
.
reified_entry
...
...
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