]> git.vpit.fr Git - perl/modules/Sub-Op.git/commitdiff
Greatly simplify the calling logic in Sub::Op::LexicalSub
authorVincent Pit <vince@profvince.com>
Wed, 14 Apr 2010 21:08:58 +0000 (23:08 +0200)
committerVincent Pit <vince@profvince.com>
Wed, 14 Apr 2010 21:08:58 +0000 (23:08 +0200)
t/Sub-Op-LexicalSub/LexicalSub.xs

index 285bc42b061997ad20f9c7adaa957aef737f0d18..a4d2d8e6cc2ccbc19b56f70005434b4893cacabc 100644 (file)
@@ -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 ------------------------------------------------------------------ */