projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5ddac6
)
revert C++ assignment fix as it breaks gcc
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 17 Jan 2008 22:09:13 +0000
(23:09 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 17 Jan 2008 22:09:13 +0000
(23:09 +0100)
Cython/Compiler/ModuleNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ModuleNode.py
b/Cython/Compiler/ModuleNode.py
index 207b02154f5bcf3fe7e6186be33d5127f861e0fe..55bbbda63ce8af422117113f8d290e4ca0602c3c 100644
(file)
--- a/
Cython/Compiler/ModuleNode.py
+++ b/
Cython/Compiler/ModuleNode.py
@@
-797,10
+797,8
@@
class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("}")
for entry in py_attrs:
name = "p->%s" % entry.cname
- if entry.type.is_extension_type:
- name = "((PyObject*)%s)" % name
- code.putln("tmp = %s;" % name)
- code.put_init_to_py_none(name, PyrexTypes.py_object_type)
+ code.putln("tmp = ((PyObject*)%s);" % name)
+ code.put_init_to_py_none(name, entry.type)
code.putln("Py_XDECREF(tmp);")
code.putln(
"return 0;")