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
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
Show 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,9 +3948,6 @@ class InlinedDefNodeCallNode(CallNode):
...
@@ -3948,9 +3948,6 @@ class InlinedDefNodeCallNode(CallNode):
func_type
=
self
.
function
.
def_node
func_type
=
self
.
function
.
def_node
for
arg
,
proto_arg
in
zip
(
self
.
args
,
func_type
.
args
):
for
arg
,
proto_arg
in
zip
(
self
.
args
,
func_type
.
args
):
if
arg
.
type
.
is_pyobject
:
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
:
else
:
arg_code
.
append
(
arg
.
result
())
arg_code
.
append
(
arg
.
result
())
...
...
Cython/Compiler/Nodes.py
View file @
2bb2f5e5
...
@@ -2989,10 +2989,6 @@ class DefNode(FuncDefNode):
...
@@ -2989,10 +2989,6 @@ class DefNode(FuncDefNode):
arg
.
entry
.
is_arg
=
1
arg
.
entry
.
is_arg
=
1
arg
.
entry
.
used
=
1
arg
.
entry
.
used
=
1
arg
.
entry
.
is_self_arg
=
arg
.
is_self_arg
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
.
star_arg
)
self
.
declare_python_arg
(
env
,
self
.
starstar_arg
)
self
.
declare_python_arg
(
env
,
self
.
starstar_arg
)
...
@@ -3068,9 +3064,6 @@ class DefNode(FuncDefNode):
...
@@ -3068,9 +3064,6 @@ class DefNode(FuncDefNode):
cname
=
entry
.
original_cname
cname
=
entry
.
original_cname
else
:
else
:
cname
=
entry
.
cname
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
:
if
entry
.
cf_used
:
return
decl
return
decl
...
@@ -3157,6 +3150,9 @@ class DefNodeWrapper(FuncDefNode):
...
@@ -3157,6 +3150,9 @@ class DefNodeWrapper(FuncDefNode):
if
self
.
signature
.
has_dummy_arg
:
if
self
.
signature
.
has_dummy_arg
:
args
.
append
(
Naming
.
self_cname
)
args
.
append
(
Naming
.
self_cname
)
for
arg
in
self
.
args
:
for
arg
in
self
.
args
:
if
arg
.
hdr_type
:
args
.
append
(
arg
.
type
.
cast_code
(
arg
.
entry
.
cname
))
else
:
args
.
append
(
arg
.
entry
.
cname
)
args
.
append
(
arg
.
entry
.
cname
)
if
self
.
star_arg
:
if
self
.
star_arg
:
args
.
append
(
self
.
star_arg
.
entry
.
cname
)
args
.
append
(
self
.
star_arg
.
entry
.
cname
)
...
...
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