From: Jarkko Hietaniemi Date: Wed, 10 Sep 2003 08:02:55 +0000 (+0000) Subject: If doing rcatline no point rescanning each time X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86173d902c03e4de5d1e5e2acd88d8a6bb5a0015;p=p5sagit%2Fp5-mst-13.2.git If doing rcatline no point rescanning each time the beginning of the SV for utf8 validity. p4raw-id: //depot/perl@21155 --- diff --git a/pp_hot.c b/pp_hot.c index 1de483c..0c4c692 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1570,10 +1570,12 @@ Perl_do_readline(pTHX) RETURN; } if (SvUTF8(sv)) { + U8 *s = (U8*)SvPVX(sv) + offset; + STRLEN len = SvCUR(sv) - offset; U8 *f; if (ckWARN(WARN_UTF8) && - !Perl_is_utf8_string_loc(aTHX_ (U8*)SvPVX(sv), SvCUR(sv), &f)) + !Perl_is_utf8_string_loc(aTHX_ s, len, &f)) /* Emulate :encoding(utf8) warning in the same case. */ Perl_warner(aTHX_ packWARN(WARN_UTF8), "utf8 \"\\x%02X\" does not map to Unicode",