projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dca6de6
)
use PyDict_DelItem() for 'del d[x]'
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 18 Nov 2008 20:37:05 +0000
(21:37 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 18 Nov 2008 20:37:05 +0000
(21:37 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index f8a01f36f0f3aa4d24d5056f70bd347cbf588cdc..3e385b7b7cf6da9dbf0bc12859277cc4958ca677 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-1720,8
+1720,11
@@
class IndexNode(ExprNode):
index_code = self.index.result()
code.globalstate.use_utility_code(delitem_int_utility_code)
else:
- function = "PyObject_DelItem"
index_code = self.index.py_result()
+ if self.base.type is dict_type:
+ function = "PyDict_DelItem"
+ else:
+ function = "PyObject_DelItem"
code.putln(
"if (%s(%s, %s%s) < 0) %s" % (
function,