Pyrex Hard Case

Rodrigo Benenson rodrigob at elo.utfsm.cl
Mon Apr 28 09:30:46 EDT 2003


I had allready done that. This command create an

extern MACRO_NAME(EXPECTED_ARGUMENTS)

Then macro name is remplaced by something like

extern double * C2F(stack).STK + x - 1 (EXPECTED_ARGUMENTS);

and the C compile is missed, this is the line I have comment via hand edit.

rodrigob.

 >
 > De: Francois Pinard <pinard at iro.umontreal.ca>
 > Fecha: 2003/04/28 Mon AM 08:55:10 GMT-04:00
 > Para: rodrigob at elo.utfsm.cl (Rodrigo Benenson)
 > CC: python-list at python.org
 > Asunto: Re: Pyrex Hard Case
 >
 > [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