Message-Id: <
10101100239.AA10002@tux0017.sdd.tokyo-sc.toshiba.co.jp>
Some more UTF-8 tr cases fixed.
p4raw-id: //depot/perl@8385
dend = dstart + nlen;
}
}
- if (grows) {
+ if (grows || hibit) {
sv_setpvn(sv, (char*)dstart, d - dstart);
Safefree(dstart);
+ if (grows && hibit)
+ Safefree(start);
}
else {
*d = '\0';
}
SvSETMAGIC(sv);
SvUTF8_on(sv);
- if (hibit)
- Safefree(start);
if (!isutf8 && !(PL_hints & HINT_UTF8))
sv_utf8_downgrade(sv, TRUE);
s += UTF8SKIP(s);
}
}
- if (grows) {
+ if (grows || hibit) {
sv_setpvn(sv, (char*)dstart, d - dstart);
Safefree(dstart);
+ if (grows && hibit)
+ Safefree(start);
}
else {
*d = '\0';
SvCUR_set(sv, d - dstart);
}
SvUTF8_on(sv);
- if (hibit)
- Safefree(start);
if (!isutf8 && !(PL_hints & HINT_UTF8))
sv_utf8_downgrade(sv, TRUE);
SvSETMAGIC(sv);