X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Op.git;a=blobdiff_plain;f=t%2FSub-Op-LexicalSub%2FLexicalSub.xs;h=62e83f833b485b36adcf21c1ab2266bbe4517d1d;hp=a60fa20044543763071f453e405460a38f0e588d;hb=302bf09fbd4b673e199bdd22b330ebbdbec4e1fe;hpb=32384f24279ef75bc0b95279c093cf90d8c47195 diff --git a/t/Sub-Op-LexicalSub/LexicalSub.xs b/t/Sub-Op-LexicalSub/LexicalSub.xs index a60fa20..62e83f8 100644 --- a/t/Sub-Op-LexicalSub/LexicalSub.xs +++ b/t/Sub-Op-LexicalSub/LexicalSub.xs @@ -22,6 +22,12 @@ STATIC OP *sols_check(pTHX_ OP *o, void *ud_) { return o; } +STATIC OP *sols_ref(pTHX_ OP *o, void *ud_) { + SV *cb = ud_; + + return newSVOP(OP_ANONCODE, o->op_flags & ~OPf_KIDS, cb); +} + STATIC OP *sols_pp(pTHX) { dSP; SV *cb; @@ -68,6 +74,7 @@ PPCODE: c.proto = SvPV_const(cb, c.protolen); } c.check = sols_check; + c.ref = sols_ref; c.ud = SvREFCNT_inc(cb); c.pp = sols_pp; sub_op_register(aTHX_ &c, 0);