[Pyrex] __Pyx_ImportModule defined twice

Stefan Behnel stefan_ml at behnel.de
Sun Oct 21 14:20:19 CEST 2007


Hi,

using cimports with the generated *_api.h file can create multiple definitions
of __Pyx_ImportModule(), so it should be wrapped by a

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
...
#endif

Ah, and: I know this is not the way cimports should be used, but since it's
currently too hard for me to make the new cimport mechanism work with lxml,
I'm back to using the generated *_api.h file for now, which makes the .pxd API
definition much shorter and cleaner.

Stefan



More information about the Pyrex mailing list