From: Vincent Pit Date: Wed, 14 Apr 2010 21:08:58 +0000 (+0200) Subject: Greatly simplify the calling logic in Sub::Op::LexicalSub X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=e87c30401d00a01f0b92de32fc9a71b25ad8b57f;p=perl%2Fmodules%2FSub-Op.git Greatly simplify the calling logic in Sub::Op::LexicalSub --- diff --git a/t/Sub-Op-LexicalSub/LexicalSub.xs b/t/Sub-Op-LexicalSub/LexicalSub.xs index 285bc42..a4d2d8e 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 ------------------------------------------------------------------ */