[Pyrex] Problems with 'public' C functions in an extension

Stefan Behnel behnel_ml at gkec.informatik.tu-darmstadt.de
Sun Jul 2 15:34:26 UTC 2006


Hi,

I'm running into a number of problems when trying to declare C functions
public in a Pyrex extension module. The first problem is that the generated
header file declares them /before/ all extension types, which lets the C
compiler complain about undeclared struct's, as these types appear in the
function arguments:

In file included from src/lxml/test.c:35:
src/lxml/etree.h:6: warning: 'struct LxmlNodeBase' declared inside parameter list
src/lxml/etree.h:6: warning: its scope is only this definition or declaration,
which is probably not what you want

But even when I fix that by moving them to the end of the header file by hand,
I can't manage to use them in an external module. The import fails with an
unknown symbol (the function name).

I can't find anything about this in the docs - is this supposed to work? Does
anyone have experience with this?

Thanks in advance,
Stefan



More information about the Pyrex mailing list