projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b7a9a9
)
don't use PyTuple_SetItem(): it differs from 'tup[i] = x' as it does not raise a...
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 19 Nov 2008 06:22:39 +0000
(07:22 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 19 Nov 2008 06:22:39 +0000
(07:22 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 3e385b7b7cf6da9dbf0bc12859277cc4958ca677..64fe891520cdc6041e3332842e0ee7e52bd641d6 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-1661,8
+1661,12
@@
class IndexNode(ExprNode):
function = "PyDict_SetItem"
elif self.base.type is list_type:
function = "PyList_SetItem"
- elif self.base.type is tuple_type:
- function = "PyTuple_SetItem"
+ # don't use PyTuple_SetItem(), as we'd normally get a
+ # TypeError when changing a tuple, while PyTuple_SetItem()
+ # would allow updates
+ #
+ #elif self.base.type is tuple_type:
+ # function = "PyTuple_SetItem"
else:
function = "PyObject_SetItem"
code.putln(