Here you have a preliminary patch for loading the refnanny API skipping dlopen() hackery.
For this to work, just make Cython/Runtime/refnanny.pyx a extension module, and put it somewhere in your PYTHONPATH. That's all!! Now build other extensions with -DCYTHON_REFNANNY and enjoy... Take into account that I'm not completelly happy with the current patch, more work is required. 1) As namespaces are a honking great idea, I do not see the point of using "Refnanny" prefixes on class and function names at refnanny.py 2) I'm a bit uncomfortable with the way I had to initialize stuff at module initialization function. 3) Many unittests in mpi4py pass, but I'm also gettting some segfaults. In particular, the refnanny stuff should no be emmited for "pure" cdef functions (I mean, those with no Python objects at all in args, retvals and local vars). For example, in mpi4py I have a finalizer routine that is registered with Py_AtExit(), then it is called after Py_Finalize(), thus no Python code should run. I'm also getting some bad interaction between refnanny and exception handling, but I need to dive deeper to catch the problem, no yet sure what is going on. We can continue discussion on cython-dev, but if any of you want to make this a ticket, go ahead! -- 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
REFNANNY.diff
Description: Binary data
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
