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
b52943ec
Commit
b52943ec
authored
Mar 25, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
07327449
ba920e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+6
-5
No files found.
Cython/Compiler/Nodes.py
View file @
b52943ec
...
@@ -961,10 +961,9 @@ class FuncDefNode(StatNode, BlockNode):
...
@@ -961,10 +961,9 @@ class FuncDefNode(StatNode, BlockNode):
for
arg
in
self
.
args
:
for
arg
in
self
.
args
:
if
arg
.
default
:
if
arg
.
default
:
if
arg
.
is_generic
:
if
arg
.
is_generic
:
if
not
hasattr
(
arg
,
'default_entry'
):
arg
.
default
.
analyse_types
(
env
)
arg
.
default
.
analyse_types
(
env
)
arg
.
default
=
arg
.
default
.
coerce_to
(
arg
.
type
,
genv
)
arg
.
default
=
arg
.
default
.
coerce_to
(
arg
.
type
,
genv
)
arg
.
default
.
allocate_temps
(
genv
)
arg
.
default
.
allocate_temps
(
genv
)
else
:
else
:
error
(
arg
.
pos
,
error
(
arg
.
pos
,
"This argument cannot have a default value"
)
"This argument cannot have a default value"
)
...
@@ -1352,9 +1351,11 @@ class CFuncDefNode(FuncDefNode):
...
@@ -1352,9 +1351,11 @@ class CFuncDefNode(FuncDefNode):
error
(
self
.
pos
,
"Function declared nogil has Python locals or temporaries"
)
error
(
self
.
pos
,
"Function declared nogil has Python locals or temporaries"
)
def
analyse_expressions
(
self
,
env
):
def
analyse_expressions
(
self
,
env
):
self
.
analyse_default_values
(
env
)
if
self
.
py_func
is
not
None
:
if
self
.
py_func
is
not
None
:
# this will also analyse the default values
self
.
py_func
.
analyse_expressions
(
env
)
self
.
py_func
.
analyse_expressions
(
env
)
else
:
self
.
analyse_default_values
(
env
)
def
generate_function_header
(
self
,
code
,
with_pymethdef
,
with_opt_args
=
1
,
with_dispatch
=
1
,
cname
=
None
):
def
generate_function_header
(
self
,
code
,
with_pymethdef
,
with_opt_args
=
1
,
with_dispatch
=
1
,
cname
=
None
):
arg_decls
=
[]
arg_decls
=
[]
...
...
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