On Mon, Feb 15, 2021 at 01:30:07PM +0100, demerphq wrote: > +XS(XS_scalar_trim); /* prototype to pass -Wmissing-prototypes */ > +XS(XS_scalar_trim) > +{ > + dXSARGS; > + SV * input; > + SV * ret = NULL; > + > + if (items != 1) > + croak_xs_usage(cv, "trim"); > + > + SP -= items; > + PUTBACK; > + > + input = ST(0); > + if (SvOK(input)) { If input is magical then this will check the pre-mg_get() version of the flag. (ie. you need SvGETMAGIC(input) before this). TonyThread Previous | Thread Next