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
Gwenaël Samain
cython
Commits
d304d225
Commit
d304d225
authored
Nov 30, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
3a6a907a
5fd59aa5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-8
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
d304d225
...
@@ -3221,9 +3221,11 @@ class DictItemNode(ExprNode):
...
@@ -3221,9 +3221,11 @@ class DictItemNode(ExprNode):
self
.
key
.
generate_evaluation_code
(
code
)
self
.
key
.
generate_evaluation_code
(
code
)
self
.
value
.
generate_evaluation_code
(
code
)
self
.
value
.
generate_evaluation_code
(
code
)
def
generate_disposal_code
(
self
,
code
):
def
generate_disposal_code
(
self
,
code
,
free_temp
=
True
,
decref
=
True
):
self
.
key
.
generate_disposal_code
(
code
)
self
.
key
.
generate_disposal_code
(
self
.
value
.
generate_disposal_code
(
code
)
code
,
free_temp
=
free_temp
,
decref
=
decref
)
self
.
value
.
generate_disposal_code
(
code
,
free_temp
=
free_temp
,
decref
=
decref
)
def
__iter__
(
self
):
def
__iter__
(
self
):
return
iter
([
self
.
key
,
self
.
value
])
return
iter
([
self
.
key
,
self
.
value
])
...
@@ -4527,7 +4529,7 @@ def binop_node(pos, operator, operand1, operand2):
...
@@ -4527,7 +4529,7 @@ def binop_node(pos, operator, operand1, operand2):
#
#
#-------------------------------------------------------------------
#-------------------------------------------------------------------
class
CoercionNode
(
ExprNode
):
class
CoercionNode
(
NewTemp
ExprNode
):
# Abstract base class for coercion nodes.
# Abstract base class for coercion nodes.
#
#
# arg ExprNode node being coerced
# arg ExprNode node being coerced
...
@@ -4766,7 +4768,7 @@ class CloneNode(CoercionNode):
...
@@ -4766,7 +4768,7 @@ class CloneNode(CoercionNode):
def
generate_result_code
(
self
,
code
):
def
generate_result_code
(
self
,
code
):
pass
pass
def
generate_disposal_code
(
self
,
code
):
def
generate_disposal_code
(
self
,
code
,
free_temp
=
True
,
decref
=
True
):
pass
pass
def
allocate_temps
(
self
,
env
):
def
allocate_temps
(
self
,
env
):
...
@@ -4812,9 +4814,9 @@ class PersistentNode(ExprNode):
...
@@ -4812,9 +4814,9 @@ class PersistentNode(ExprNode):
self
.
arg
.
generate_disposal_code
(
code
)
self
.
arg
.
generate_disposal_code
(
code
)
self
.
generate_counter
+=
1
self
.
generate_counter
+=
1
def
generate_disposal_code
(
self
,
code
):
def
generate_disposal_code
(
self
,
code
,
free_temp
=
True
,
decref
=
True
):
if
self
.
generate_counter
==
self
.
uses
:
if
self
.
generate_counter
==
self
.
uses
:
if
self
.
type
.
is_pyobject
:
if
self
.
type
.
is_pyobject
and
decref
:
code
.
put_decref_clear
(
self
.
result
(),
self
.
ctype
())
code
.
put_decref_clear
(
self
.
result
(),
self
.
ctype
())
def
allocate_temps
(
self
,
env
,
result
=
None
):
def
allocate_temps
(
self
,
env
,
result
=
None
):
...
...
Cython/Compiler/Nodes.py
View file @
d304d225
...
@@ -251,7 +251,7 @@ class CompilerDirectivesNode(Node):
...
@@ -251,7 +251,7 @@ class CompilerDirectivesNode(Node):
self
.
body
.
annotate
(
code
)
self
.
body
.
annotate
(
code
)
code
.
globalstate
.
directives
=
old
code
.
globalstate
.
directives
=
old
class
BlockNode
:
class
BlockNode
(
object
)
:
# Mixin class for nodes representing a declaration block.
# Mixin class for nodes representing a declaration block.
def
generate_const_definitions
(
self
,
env
,
code
):
def
generate_const_definitions
(
self
,
env
,
code
):
...
...
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