XS(XS_test_round); /* prototype to pass -Wmissing-prototypes */ XS(XS_test_round) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "arg"); { double arg = (double)SvNV(ST(0)); #line 30 "test.xs" if (arg > 0.0) { arg = floor(arg + 0.5); } else if (arg < 0.0) { arg = ceil(arg - 0.5); } else { arg = 0.0; } #line 137 "test.c" sv_setnv(ST(0), (double)arg); SvSETMAGIC(ST(0)); } XSRETURN_EMPTY; }