In commit df54195ce73a, you changed this bit of my original push.

------------------------ Cython/Compiler/ModuleNode.py ------------------------
@@ -1706,6 -1706,10 +1706,9 @@
                 code.put_decref_clear(entry.pystring_cname,
                                       PyrexTypes.py_object_type,
                                       nanny=False)
+        for entry in env.default_entries:
+            if entry.type.is_pyobject and entry.used:
-                code.putln("Py_DECREF(%s); %s = 0;" % (
-                        code.entry_as_pyobject(entry), entry.cname))
+                code.put_var_decref_clear(entry)
         code.putln("Py_INCREF(Py_None); return Py_None;")
         code.putln('}')


Please revert to my implementation (bare Py_DECREF and nullify), or
any other that does not break C compilation... IMHO, The module
cleanup function is not a place to play with refnanny. Moreover, the
module cleanup funcion is not refnanny-managed...

BTW, I believe that cleanup code should be generated when running the
testsuite...


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to