[Pyrex] C public functions conflict with protos in headers

Michal Pasternak michal at pasternak.w.lub.pl
Tue Jun 29 02:34:24 CEST 2004


Phil Frost [Mon, Jun 28, 2004 at 08:20:59PM -0400]:
> On Tue, Jun 29, 2004 at 02:09:42AM +0200, Michal Pasternak wrote:
> > 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
> 
> Nope, that just gives me:
> "Conflicting visibility options 'extern' and 'public'"

Ah, of course, my fault - removing "public" from cdef write line should do.




More information about the Pyrex mailing list