From: Nick Ing-Simmons Date: Mon, 12 Jul 2004 12:17:56 +0000 (+0000) Subject: Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=61468b033262a3098f06f5437d4f3f1f301cacb3;p=p5sagit%2Fp5-mst-13.2.git Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len) Can now handle the case is_utf8_string(NULL,0) again. Why do we have code dup for Perl_is_utf8_string_loc() ? p4raw-id: //depot/perl@23083 --- diff --git a/utf8.c b/utf8.c index 6f201a2..6155fab 100644 --- a/utf8.c +++ b/utf8.c @@ -232,7 +232,7 @@ Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len) U8* send; STRLEN c; - if (!len) + if (!len && s) len = strlen((char *)s); send = s + len; @@ -272,7 +272,7 @@ Perl_is_utf8_string_loc(pTHX_ U8 *s, STRLEN len, U8 **p) U8* send; STRLEN c; - if (!len) + if (!len && s) len = strlen((char *)s); send = s + len;