[Pyrex] C public functions conflict with protos in headers
Michal Pasternak
michal at pasternak.w.lub.pl
Tue Jun 29 02:09:42 CEST 2004
Phil Frost [Mon, Jun 28, 2004 at 07:55:07PM -0400]:
> I'm trying to use Pyrex to implement a C API (part of libc, actually),
> and I'm having problems when I try to compile the generated code. To
> include the C header, i do:
>
> cdef extern from 'unistd.h':
> pass
>
> then I implement write() like so:
>
> cdef public int write( int fd, void *buf, size_t len ):
> pass
Declare it like this:
cdef extern from 'unistd.h':
cdef public int write( int fd, void *buf, size_t len )
pass
Should work.
--
m
More information about the Pyrex
mailing list