summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-11-22 11:29:03 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-11-22 11:29:03 +0000
commit798bec46ce5ad8ebd5417d3924d03658fcf2ed0b (patch)
tree275113221556dd39972b9053865ab357425f1272 /pp_hot.c
parenta86d78b98bbb3a5fa56caee3b81e72336148be12 (diff)
downloadperl-798bec46ce5ad8ebd5417d3924d03658fcf2ed0b.tar.gz
Revert change #26185, which could have some unwanted side-effects.
(lib/warnings.t had failures due to this patch.) Moreover Dave Mitchell correctly pointed out that [perl #37722] wasn't really a bug. p4raw-link: @26185 on //depot/perl: 91cec4fb3b9ce703dab10db05e717127b2a9ed44 p4raw-id: //depot/perl@26190
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 8502c1c9a1..813b606b0b 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -148,14 +148,11 @@ PP(pp_concat)
dPOPTOPssrl;
bool lbyte;
STRLEN rlen;
- const char *rpv;
- bool rbyte;
+ const char *rpv = SvPV_const(right, rlen); /* mg_get(right) happens here */
+ const bool rbyte = !DO_UTF8(right);
bool rcopied = FALSE;
if (TARG == right && right != left) {
- /* mg_get(right) may happen here ... */
- rpv = SvPV_const(right, rlen);
- rbyte = !DO_UTF8(right);
right = sv_2mortal(newSVpvn(rpv, rlen));
rpv = SvPV_const(right, rlen); /* no point setting UTF-8 here */
rcopied = TRUE;
@@ -182,11 +179,6 @@ PP(pp_concat)
SvUTF8_off(TARG);
}
- /* or mg_get(right) may happen here */
- if (!rcopied) {
- rpv = SvPV_const(right, rlen);
- rbyte = !DO_UTF8(right);
- }
if (lbyte != rbyte) {
if (lbyte)
sv_utf8_upgrade_nomg(TARG);