X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2FSub-Op-LexicalSub%2FLexicalSub.xs;h=a9b1344bba9b998a7f4033d52f30d7060dfede8f;hb=b9c3a456f75424383f35cb83000965d76e56d4ed;hp=e67d5baa33d02e4711484180ed6b13fbb4e0905a;hpb=14a44e7b2f834cbd0d2ba8cc63deda55b3e5f0dd;p=perl%2Fmodules%2FSub-Op.git diff --git a/t/Sub-Op-LexicalSub/LexicalSub.xs b/t/Sub-Op-LexicalSub/LexicalSub.xs index e67d5ba..a9b1344 100644 --- a/t/Sub-Op-LexicalSub/LexicalSub.xs +++ b/t/Sub-Op-LexicalSub/LexicalSub.xs @@ -24,7 +24,6 @@ STATIC OP *sols_check(pTHX_ OP *o, void *ud_) { STATIC OP *sols_pp(pTHX) { dSP; - dMARK; SV *cb; int i, items; @@ -37,22 +36,10 @@ STATIC OP *sols_pp(pTHX) { cb = *svp; } - ENTER; - SAVETMPS; - - PUSHMARK(MARK); - - items = call_sv(cb, G_ARRAY); - - SPAGAIN; - for (i = 0; i < items; ++i) - SvREFCNT_inc(SP[-i]); + XPUSHs(cb); PUTBACK; - FREETMPS; - LEAVE; - - return NORMAL; + return CALL_FPTR(PL_ppaddr[OP_ENTERSUB])(aTHX); } /* --- XS ------------------------------------------------------------------ */ @@ -75,11 +62,12 @@ PPCODE: if (SvROK(cb)) { cb = SvRV(cb); if (SvTYPE(cb) >= SVt_PVCV) { - c.name = SvPV_const(name, c.len); + sub_op_init(&c); + c.name = SvPV_const(name, c.namelen); c.check = sols_check; c.ud = SvREFCNT_inc(cb); c.pp = sols_pp; - sub_op_register(aTHX_ &c); + sub_op_register(aTHX_ &c, 0); } } XSRETURN(0);