[Pyrex] Possible function prototypes bug?
Lenard Lindstrom
len-l at telus.net
Wed Feb 14 19:34:24 UTC 2007
Pyrex 0.9.5.1, unpatched.
The following Pyrex module compiled without error messages:
cdef int foo(int x)
def pyfoo(int x):
return foo(x)
The C file has a foo prototype:
/* Declarations from mod */
static int (__pyx_f_3mod_foo(int )); /*proto*/
But the foo call in pyfoo is missing:
/* "C:\user\projects\Python25\pxd\mod.pyx":4 */
__pyx_1 = PyInt_FromLong(...); if (!__pyx_1) {...}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;
Adding a foo definition to the Pyrex program after the prototype causes
a "redeclared" error.
--
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list