Pyrex Hard Case

Francois Pinard pinard at
Mon Apr 28 14:55:10 CEST 2003

[Rodrigo Benenson]

> Basically there is a Macro function that I can't map to Pyrex, so I
> create an equivalent dummy function and hand edit the .c file erasing
> the definition.

I'm not fully sure I'm replying to your question, but this might work:

cdef extern from *:

If you do that, every time you use MACRO_NAME as a Python function, the
net effect will be to call the macro, and Pyrex will make no attempt to
declare it in the generated C code.  Of course, you may replace `*' above
by the header file defining the macro, if it needs an explicit #include.

François Pinard

More information about the Python-list mailing list