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
e692110d
Commit
e692110d
authored
Jul 03, 2009
by
Danilo Freitas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes on DelStatNode
parent
6ee3cf6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+4
-2
Cython/Compiler/Parsing.pxd
Cython/Compiler/Parsing.pxd
+1
-0
Cython/Compiler/Tests/TestDecorators.py
Cython/Compiler/Tests/TestDecorators.py
+0
-1
No files found.
Cython/Compiler/Nodes.py
View file @
e692110d
...
...
@@ -3388,18 +3388,20 @@ class DelStatNode(StatNode):
arg
.
analyse_target_expression
(
env
,
None
)
if
arg
.
type
.
is_pyobject
or
(
arg
.
type
.
is_ptr
and
arg
.
type
.
base_type
.
is_cpp_class
):
self
.
gil_check
(
env
)
elif
arg
.
type
.
is_cpp_class
:
error
(
arg
.
pos
,
"Deletion of static C++ object"
)
else
:
error
(
arg
.
pos
,
"Deletion of non-Python object"
)
#arg.release_target_temp(env)
gil_message
=
"Deleting Python object"
gil_message
=
"Deleting Python object
or C++ dynamic object
"
def
generate_execution_code
(
self
,
code
):
for
arg
in
self
.
args
:
if
arg
.
type
.
is_pyobject
:
arg
.
generate_deletion_code
(
code
)
elif
arg
.
type
.
is_ptr
and
arg
.
type
.
base_type
.
is_cpp_class
:
code
.
putln
(
"delete %s"
%
arg
.
name
)
code
.
putln
(
"delete %s
;
"
%
arg
.
name
)
# else error reported earlier
def
annotate
(
self
,
code
):
...
...
Cython/Compiler/Parsing.pxd
View file @
e692110d
...
...
@@ -27,6 +27,7 @@ cpdef p_typecast(PyrexScanner s)
cpdef
p_sizeof
(
PyrexScanner
s
)
cpdef
p_yield_expression
(
PyrexScanner
s
)
cpdef
p_power
(
PyrexScanner
s
)
cpdef
p_new_expr
(
PyrexScanner
s
)
cpdef
p_trailer
(
PyrexScanner
s
,
node1
)
cpdef
p_call
(
PyrexScanner
s
,
function
)
cpdef
p_index
(
PyrexScanner
s
,
base
)
...
...
Cython/Compiler/Tests/TestDecorators.py
View file @
e692110d
...
...
@@ -12,7 +12,6 @@ class TestDecorator(TransformTest):
def decorated():
pass
"""
)
self
.
assertCode
(
u"""
def decorator(fun):
return fun
...
...
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