[Cython] PEP 3121 on extension module initialisation in Py3
Stefan Behnel
stefan_ml at behnel.de
Tue Jun 10 21:37:47 CEST 2008
Hi,
Lisandro Dalcin wrote:
> 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
That's not the case for types at all. If you say
cdef public class _Element [ type LxmlElementType, object LxmlElement ]:
then the names appear in the C file unchanged.
Stefan
More information about the Cython-dev
mailing list