Hi,

two little questions this time.

1) When I return multiple values from an XSUB by doing a

    ST(0) = sv_newmortal(...);
    ST(1) = sv_newmortal(...);
    XSRETURN(2);

do I have to do a prior EXTEND(SP, 2)? Currently I am not doing it and
it seems to work fine.

2) For some parameter parsing, I'd like to get rid of a few warnings
that happen when I do a 'SvIV(ST(n))' and ST(n) is not SvIOK but rather
a string or so. I didn't find an interface to the warnings and so poked
around a little in warnings.h. Right now I'm doing it this way:

    CODE:
    {
        SV *oldwarn = PL_curcops->cop_warnings;
        PL_curcops->cop_warnings = pWARN_NONE;
        ...
        PL_curcops->cop_warnings = oldwarn;
        XSRETURN_YES;
    }

Is there a clean and commonly accepted way of doing it? And if not, is
the above reliable?

TIA,
Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval

Reply via email to