X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp.h;h=c36502a03fa3a950a0179d81fe467ff9e9f8d366;hb=80008eb3e450496f17610b8bfc820f627a758a13;hp=a0714e955090f647f5e43de76c3f2b33259bbe5f;hpb=07fe7c6a9fbc767805839cebb0e0e06dd88b0104;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp.h b/pp.h index a0714e9..c36502a 100644 --- a/pp.h +++ b/pp.h @@ -86,7 +86,7 @@ Refetch the stack pointer. Used after a callback. See L. #define dTARG SV *targ #define NORMAL PL_op->op_next -#define DIE return Perl_die +#define DIE Perl_die /* =for apidoc Ams||PUTBACK @@ -473,14 +473,28 @@ Does not use C. See also C, C and C. #define tryAMAGICftest(chr) \ STMT_START { \ - if (SvAMAGIC(TOPs)) { \ + assert(chr != '?'); \ + if ((PL_op->op_flags & OPf_KIDS) \ + && SvAMAGIC(TOPs)) { \ const char tmpchr = (chr); \ SV * const tmpsv = amagic_call(TOPs, \ newSVpvn_flags(&tmpchr, 1, SVs_TEMP), \ - ftest_amg, 0); \ + ftest_amg, AMGf_unary); \ \ if (tmpsv) { \ + const OP *next = PL_op->op_next; \ + \ SPAGAIN; \ + \ + if (next->op_type >= OP_FTRREAD && \ + next->op_type <= OP_FTBINARY && \ + next->op_private & OPpFT_STACKED \ + ) { \ + if (SvTRUE(tmpsv)) \ + /* leave the object alone */ \ + RETURN; \ + } \ + \ SETs(tmpsv); \ RETURN; \ } \