diff options
author | Vincent Pit <perl@profvince.com> | 2010-06-03 11:44:15 +0200 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2010-06-03 14:00:38 +0200 |
commit | 789bd863840ef4ff6c46f7c2ee0f3f64e0b5daa6 (patch) | |
tree | 547efad230cfa3f03e5c971600e394627beb62f3 /pp.c | |
parent | 540810e8986e170e75f4b34a7ca1f1dd5b0da3c4 (diff) | |
download | perl-789bd863840ef4ff6c46f7c2ee0f3f64e0b5daa6.tar.gz |
Make pp_reverse fetch the lexical $_ from the correct pad
This is achieved by introducing a new find_rundefsv() function in pad.c
This fixes [perl #75436].
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -5489,19 +5489,12 @@ PP(pp_reverse) register I32 tmp; dTARGET; STRLEN len; - PADOFFSET padoff_du; SvUTF8_off(TARG); /* decontaminate */ if (SP - MARK > 1) do_join(TARG, &PL_sv_no, MARK, SP); else { - sv_setsv(TARG, (SP > MARK) - ? *SP - : (padoff_du = find_rundefsvoffset(), - (padoff_du == NOT_IN_PAD - || PAD_COMPNAME_FLAGS_isOUR(padoff_du)) - ? DEFSV : PAD_SVl(padoff_du))); - + sv_setsv(TARG, SP > MARK ? *SP : find_rundefsv()); if (! SvOK(TARG) && ckWARN(WARN_UNINITIALIZED)) report_uninit(TARG); } |