On Thu, Jan 12, 2006 at 04:53:26PM +0100, Leopold Toetsch wrote:
> Klaas-Jan Stol wrote:
> >Hi,
> >
> >I'm trying to implement some functions into the Lua PMCs, but I'm having 
> >trouble to compile them.
> >
> >I want to add a clone method to the LuaNil PMC (which should extend 
> >Null.pmc, not None.pmc, as it does currently; changed that already)
> >
> >However, I get the following error:
> >
> >luanil.c:343: error: conflicting types for `clone'
> >/usr/include/bits/sched.h:72: error: previous declaration of `clone'
> >compile luanil.c failed (256)
> 
> clone is a standardized vtable function. But it's name is never a bare 
> 'clone', it's always prefixed by 'Parrot_<ClassName>_. This is also true 
> for
> 
>   METHOD PMC* clone()  # dunno if that works, if vtable exists
> 
> You must have some bug in your PMC code.

On Linux clone() is a syscall with a wraper function in the the standard
library that is defined in sched.h.  On my laptop types.h includes
pthreadtypes.h which includes sched.h.  You should *probably* use a
different function name. ;)

-J

--

Attachment: pgp4nRk8BaRkx.pgp
Description: PGP signature

Reply via email to