Pyrex Hard Case

Francois Pinard pinard at iro.umontreal.ca
Mon Apr 28 08:55:10 EDT 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 *:
    MACRO_NAME(EXPECTED_ARGUMENTS)
----------------------------------------------------------------------<

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   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list