On Thu, Oct 12, 2000 at 02:58:23PM +0100, Nick Ing-Simmons wrote: >Brendan O'Dea <bod@compusol.com.au> writes: >> >>INTERFACE_MACRO allows you to use a different method to extract/store >>the C function pointer than the defaults of XSINTERFACE_FUNC and >>XSINTERFACE_FUNC_SET as seen above. >> >>This mechanism appears to work in 5.005, but doesn't compile under 5.6.0 >>as the current CV is not visible within XS_Foo_whatever as `cv'. > >It cannot be too different though as Tk's scheme (which is similar >but less automated) works fine with 5.6.0 OK wrong guess :-) The compiler (gcc 2.95.2) was producing: Foo.c: In function `XS_Foo_whatever': Foo.c:38: parse error before `cv' ... although the `cv' it is complaining about in this case is in the cast of (int (*cv)()) producted by the XSINTERFACE_FUNC macro. This may be corrected by changing the definition in XSUB.h: -#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT(ret,cv))(f)) +#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT(ret,))(f)) which I note is how 5.005 had it. Regards, -- Brendan O'Dea bod@compusol.com.au Compusol Pty. Limited (NSW, Australia) +61 2 9810 3633Thread Previous | Thread Next