AFAIK, cdef classes can only have one base, right? This would let us
get rid of module-global types at deallocators... Am I missing
something?

diff -r edbbb70369d7 Cython/Compiler/ModuleNode.py
--- a/Cython/Compiler/ModuleNode.py     Tue Feb 24 21:31:02 2009 -0300
+++ b/Cython/Compiler/ModuleNode.py     Tue Feb 24 23:53:26 2009 -0300
@@ -943,7 +943,7 @@
         if base_type:
             tp_dealloc = TypeSlots.get_base_slot_function(scope, tp_slot)
             if tp_dealloc is None:
-                tp_dealloc = "%s->tp_dealloc" % base_type.typeptr_cname
+                tp_dealloc = "Py_TYPE(o)->tp_base->tp_dealloc"
             code.putln(
                     "%s(o);" % tp_dealloc)
         else:


-- 
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