From: Jeff Mitchell Date: 2004-05-25T10:39:56+09:00 Subject: Re: -Wstrict-prototypes for extensions --- nobu.nokada@softhome.net wrote: > Hi, > > At Tue, 25 May 2004 09:10:06 +0900, > Jeff Mitchell wrote in [ruby-core:02938]: > > -#define ANYARGS > > +# ifdef RUBY_STRICT_PROTOTYPES > > +# define ANYARGS void > > +# else > > +# define ANYARGS > > +# endif > > #endif > > ANYARGS doesn't always mean that the function takes no > arguments. The 'void' is only there to satisfy -Wstrict-prototypes, which does not allow VALUE (*)() but will allow VALUE (*)(void). Arguments to rb_define_method() and such naturally must be casted to VALUE (*)(void). This is a small price for the benefit of -Wstrict-prototypes. Unless there is some other way to suppress these warnings (I wasn't able to find an appropriate pragma). __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/