diff options
author | Ben Morrow <ben@morrow.me.uk> | 2009-01-20 01:29:50 +0000 |
---|---|---|
committer | Ben Morrow <ben@morrow.me.uk> | 2009-03-25 21:14:06 +0000 |
commit | 7fb13887d71713a7821f3417b415917a61fdcf6c (patch) | |
tree | 6199a71c8810cf3a5d98532f71075a240ce88588 /pp.h | |
parent | 4d57d24f51f1e1421107065f0f777ed2e565907e (diff) | |
download | perl-7fb13887d71713a7821f3417b415917a61fdcf6c.tar.gz |
Stacked overloaded -X.
Diffstat (limited to 'pp.h')
-rw-r--r-- | pp.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -473,6 +473,7 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. #define tryAMAGICftest(chr) \ STMT_START { \ + assert(chr != '?'); \ if (SvAMAGIC(TOPs)) { \ const char tmpchr = (chr); \ SV * const tmpsv = amagic_call(TOPs, \ @@ -480,7 +481,19 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. 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; \ } \ |