On Wed, Dec 28, 2016 at 05:37:04AM -0800, James E Keenan via RT wrote: > On Wed, 28 Dec 2016 06:00:21 GMT, tauner@technikum-wien.at wrote: > > > > h2xs -x booltest.h > > So this might be a bug in C::Scan (which I have installed via cpanm > > from HVDS/C-Scan-0.74)? > > > > What happens if you do not use the '-x' option and thereby avoid C::Scan? > > (When I did that, 'make' completed -- but since I've rarely attempted to write XS I don't know whether that's meaningful or not.) > > Thank you very much. When foo,h contains this: #include <stdbool.h> void h2xs(bool b); then h2xs -x foo.h, via C::Scan, is generating an XS file that looks like: void h2xs(arg0) which is being converted into the C code XS_EUPXS(XS_Foo_h2xs); /* prototype to pass -Wmissing-prototypes */ XS_EUPXS(XS_Foo_h2xs) { dVAR; dXSARGS; if (items != 1) croak_xs_usage(cv, "arg0"); { h2xs(arg0); } XSRETURN_EMPTY; } The issues seem to be that 1) h2xs and/or C::Scan isn't including the variable type for arg0 in the generated XS; I assume that it should have output: void h2xs(bool arg0) 2) that ExtUtils/xsubpp isn't seeing that as an error and is instead converting it onto invalid C code, by not including the line: bool arg0 = (bool)SvTRUE(ST(0)) Does anyone here more familiar with XS want to comment? -- Indomitable in retreat, invincible in advance, insufferable in victory -- Churchill on MontgomeryThread Previous | Thread Next