summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-11 21:48:58 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-29 09:36:25 -0700
commit2a90c7c66a488294c5c30860c8d5794bb9264c30 (patch)
tree62ef2eb7eccc53ba78200b54c08aeb3295ba5382 /pp.c
parentd51f8b19c6cefdcf4f7b6c08b7458ab3c80b0a8e (diff)
downloadperl-2a90c7c66a488294c5c30860c8d5794bb9264c30.tar.gz
pp.c:pp_coreargs: use PL_op_desc instead of OP_DESC
Instead of using OP_DESC on op_next, since we already know the op number, we can just go straight to PL_op_desc, which is what OP_DESC itself uses after looking inside op_next to find out what the op number is. BTW, &CORE::scalar will need this, since a scalar op is never actu- ally executed, making coreargs’ op_next pointer point to another op than expected: 2 <1> leavesublv[1 ref] K/REFC,1 ->(end) - <1> scalar sKP/1 ->2 1 <$> coreargs(IV 2) s ->2 -e syntax OK Otherwise we get ‘Not enough arguments for lvalue subroutine return’.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 4c11588a49..5fecd03627 100644
--- a/pp.c
+++ b/pp.c
@@ -5906,7 +5906,7 @@ PP(pp_coreargs)
/* diag_listed_as: Too many arguments for %s */
Perl_croak(aTHX_
"%s arguments for %s", err,
- opnum ? OP_DESC(PL_op->op_next) : SvPV_nolen_const(cSVOP_sv)
+ opnum ? PL_op_desc[opnum] : SvPV_nolen_const(cSVOP_sv)
);
/* Reset the stack pointer. Without this, we end up returning our own