diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-10 08:02:55 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-10 08:02:55 +0000 |
commit | 86173d902c03e4de5d1e5e2acd88d8a6bb5a0015 (patch) | |
tree | dff953e4b7d4d91df37faffacbfcf85def7b5a37 /pp_hot.c | |
parent | 532ffc5d12f1c363c9c70bfcf166e7ed040fdbd4 (diff) | |
download | perl-86173d902c03e4de5d1e5e2acd88d8a6bb5a0015.tar.gz |
If doing rcatline no point rescanning each time
the beginning of the SV for utf8 validity.
p4raw-id: //depot/perl@21155
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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", |