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
855fa445
Commit
855fa445
authored
Mar 31, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix copying slice objects in python 2.4
parent
7272a40d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+14
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
855fa445
...
...
@@ -13,6 +13,7 @@ cython.declare(error=object, warning=object, warn_once=object, InternalError=obj
debug_disposal_code
=
object
,
debug_temp_alloc
=
object
,
debug_coercion
=
object
)
import
sys
import
copy
import
operator
from
Errors
import
error
,
warning
,
warn_once
,
InternalError
,
CompileError
...
...
@@ -3452,6 +3453,19 @@ class SliceNode(ExprNode):
if
self
.
is_literal
:
code
.
put_giveref
(
self
.
py_result
())
def
__deepcopy__
(
self
,
memo
):
"""
There is a copy bug in python 2.4 for slice objects.
"""
return
SliceNode
(
self
.
pos
,
start
=
copy
.
deepcopy
(
self
.
start
,
memo
),
stop
=
copy
.
deepcopy
(
self
.
stop
,
memo
),
step
=
copy
.
deepcopy
(
self
.
step
,
memo
),
is_temp
=
self
.
is_temp
,
is_literal
=
self
.
is_literal
,
constant_result
=
self
.
constant_result
)
class
CallNode
(
ExprNode
):
...
...
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