Fix C++ fix
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 18 Jan 2008 05:51:21 +0000 (21:51 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 18 Jan 2008 05:51:21 +0000 (21:51 -0800)
Cython/Compiler/ModuleNode.py
Cython/Compiler/Version.py

index 207b02154f5bcf3fe7e6186be33d5127f861e0fe..b242066169f8ac64730e1c311d10f51651516418 100644 (file)
@@ -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 = %s;" % code.as_pyobject(name, entry.type))
+            code.put_init_to_py_none(name, entry.type)
             code.putln("Py_XDECREF(tmp);")
         code.putln(
             "return 0;")
index 929cd08c55a1b6645e8643b15359225059edc0f8..2b6abfe123802b2ff7e1df8834e03446bbc1d39a 100644 (file)
@@ -1 +1 @@
-version = '0.9.6.11'
+version = '0.9.6.11b'