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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
2bb2f5e5
Commit
2bb2f5e5
authored
Jan 12, 2012
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DefNode: Use specialized signature insted of generic PyObject
parent
1e94a834
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-4
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+5
-9
No files found.
Cython/Compiler/ExprNodes.py
View file @
2bb2f5e5
...
...
@@ -3948,10 +3948,7 @@ class InlinedDefNodeCallNode(CallNode):
func_type
=
self
.
function
.
def_node
for
arg
,
proto_arg
in
zip
(
self
.
args
,
func_type
.
args
):
if
arg
.
type
.
is_pyobject
:
if
proto_arg
.
hdr_type
:
arg_code
.
append
(
arg
.
result_as
(
proto_arg
.
hdr_type
))
else
:
arg_code
.
append
(
arg
.
result_as
(
proto_arg
.
type
))
arg_code
.
append
(
arg
.
result_as
(
proto_arg
.
type
))
else
:
arg_code
.
append
(
arg
.
result
())
arg_code
=
', '
.
join
(
arg_code
)
...
...
Cython/Compiler/Nodes.py
View file @
2bb2f5e5
...
...
@@ -2989,10 +2989,6 @@ class DefNode(FuncDefNode):
arg
.
entry
.
is_arg
=
1
arg
.
entry
.
used
=
1
arg
.
entry
.
is_self_arg
=
arg
.
is_self_arg
if
arg
.
hdr_type
:
if
arg
.
is_self_arg
or
arg
.
is_type_arg
or
\
(
arg
.
type
.
is_extension_type
and
not
arg
.
hdr_type
.
is_extension_type
):
arg
.
entry
.
is_declared_generic
=
1
self
.
declare_python_arg
(
env
,
self
.
star_arg
)
self
.
declare_python_arg
(
env
,
self
.
starstar_arg
)
...
...
@@ -3068,10 +3064,7 @@ class DefNode(FuncDefNode):
cname
=
entry
.
original_cname
else
:
cname
=
entry
.
cname
if
arg
.
is_self_arg
or
arg
.
is_type_arg
or
entry
.
is_declared_generic
:
decl
=
"PyObject *%s"
%
cname
else
:
decl
=
entry
.
type
.
declaration_code
(
cname
)
decl
=
entry
.
type
.
declaration_code
(
cname
)
if
entry
.
cf_used
:
return
decl
return
'CYTHON_UNUSED '
+
decl
...
...
@@ -3157,7 +3150,10 @@ class DefNodeWrapper(FuncDefNode):
if
self
.
signature
.
has_dummy_arg
:
args
.
append
(
Naming
.
self_cname
)
for
arg
in
self
.
args
:
args
.
append
(
arg
.
entry
.
cname
)
if
arg
.
hdr_type
:
args
.
append
(
arg
.
type
.
cast_code
(
arg
.
entry
.
cname
))
else
:
args
.
append
(
arg
.
entry
.
cname
)
if
self
.
star_arg
:
args
.
append
(
self
.
star_arg
.
entry
.
cname
)
if
self
.
starstar_arg
:
...
...
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