diff options
author | David Mitchell <davem@iabyn.com> | 2010-07-02 21:33:01 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-07-03 16:25:58 +0100 |
commit | c5aa2872379824e696683293ee3de5762325de1e (patch) | |
tree | 281fa18ce92cfc817d633083f41f21b0a3651f4b /pp_hot.c | |
parent | 895b760f672897cb301e8900c05743c32f282f42 (diff) | |
download | perl-c5aa2872379824e696683293ee3de5762325de1e.tar.gz |
remove double stringify-overload from $ovld .= foo
There was a piece of code in pp_concat who's job it was to determine the
UT8ness of the LHS, and it did it in a heavy-handed way to cope with the
special case of a regexp (which is an RV pointing to REGEXP which might
be UTF8)
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -255,14 +255,13 @@ PP(pp_concat) SvUTF8_off(TARG); } else { /* TARG == left */ - STRLEN llen; if (!SvOK(TARG)) { if (left == right && ckWARN(WARN_UNINITIALIZED)) report_uninit(right); sv_setpvs(left, ""); } - (void)SvPV_nomg_const(left, llen); /* Needed to set UTF8 flag */ - lbyte = !DO_UTF8(left); + lbyte = (SvROK(left) && SvTYPE(SvRV(left)) == SVt_REGEXP) + ? !DO_UTF8(SvRV(left)) : !DO_UTF8(left); if (IN_BYTES) SvUTF8_off(TARG); } |