X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2FSub-Op-LexicalSub%2FLexicalSub.xs;h=c2b7002d11ac6dd00964461bc7b5d1bb4c302bc7;hb=c987524f0641ca6a25d5e3072c9d1a2ecef2f57c;hp=285bc42b061997ad20f9c7adaa957aef737f0d18;hpb=a0c0873977f66d8024a988b8dbd8e1c092927189;p=perl%2Fmodules%2FSub-Op.git diff --git a/t/Sub-Op-LexicalSub/LexicalSub.xs b/t/Sub-Op-LexicalSub/LexicalSub.xs index 285bc42..c2b7002 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,6 +62,7 @@ PPCODE: if (SvROK(cb)) { cb = SvRV(cb); if (SvTYPE(cb) >= SVt_PVCV) { + sub_op_init(&c); c.name = SvPV_const(name, c.namelen); c.check = sols_check; c.ud = SvREFCNT_inc(cb);