From: Marcus Holland-Moritz Date: Sun, 30 Dec 2007 04:44:40 +0000 (+0000) Subject: Include SVf_UTF8 in the bitmask when checking the SvFLAGS in X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7a4fb4f15fdc766da6e47dfceacff29a5121ae5;p=p5sagit%2Fp5-mst-13.2.git Include SVf_UTF8 in the bitmask when checking the SvFLAGS in SvPVutf8_force(), as otherwise the conditional expression will always be false and the optimisation will never kick in. p4raw-id: //depot/perl@32781 --- diff --git a/sv.h b/sv.h index 0d361d3..6855e6e 100644 --- a/sv.h +++ b/sv.h @@ -1791,7 +1791,7 @@ Like C but doesn't process magic. ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvutf8(sv, &lp)) #define SvPVutf8_force(sv, lp) \ - ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == (SVf_POK|SVf_UTF8) \ + ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8|SVf_THINKFIRST)) == (SVf_POK|SVf_UTF8) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvutf8n_force(sv, &lp))