[Cython] PEP 3121 on extension module initialisation in Py3
Lisandro Dalcin
dalcinl at gmail.com
Tue Jun 10 21:31:46 CEST 2008
Ups!... I didn't know this was already available! I've just reviewed
the generated code, and the implementation of all this seems just
perfect and amazing!!
But I would like to know something. In the example available in the
link you pointed me we have:
cdef api void activate(Vehicle *v):
.....
and then in the generated 'delorean_api.h' we have
static void (*activate)(struct Vehicle *);
Then the question is: Why the C name of the function pointer
'activate' is not mangled, using something like this (as it is
similarly done for C type objects):
static void (*__pyx_cfun_8delorean_activate)(struct Vehicle *);
#define activate __pyx_cfun_8delorean_activate
On 6/10/08, Stefan Behnel <stefan_ml at behnel.de> wrote:
>
> Lisandro Dalcin wrote:
> > Furthermore, we can 'abuse' of this new feature to 'export' C API's
> > from Cython-generated extension modules to other third-party
> > Cython-generated modules, thus avoiding at all the need of relying on
> > dynamic linking or dlopen hackery. Just some more good stuff for the
> > near future ...
>
>
> http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/external.html#C_API_Declarations
>
>
> Stefan
>
> _______________________________________________
> Cython-dev mailing list
> Cython-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
>
--
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
More information about the Cython-dev
mailing list