This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c apidoc
authorSimon Cozens <simon@netthink.co.uk>
Thu, 14 Sep 2000 23:46:57 +0000 (00:46 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 14 Sep 2000 22:53:37 +0000 (22:53 +0000)
Message-ID: <20000914234657.A13953@deep-dark-truthful-mirror.perlhacker.org>

p4raw-id: //depot/perl@7087

perlapi.c
pod/perlapi.pod
utf8.c

index 496fcc9..614f94f 100644 (file)
--- a/perlapi.c
+++ b/perlapi.c
@@ -3380,9 +3380,9 @@ Perl_bytes_to_utf8(pTHXo_ U8 *s, STRLEN *len)
 
 #undef  Perl_utf8_to_uv
 UV
-Perl_utf8_to_uv(pTHXo_ U8 *s, I32* retlen)
+Perl_utf8_to_uv(pTHXo_ U8 *s, I32* retlen, bool checking)
 {
-    return ((CPerlObj*)pPerl)->Perl_utf8_to_uv(s, retlen);
+    return ((CPerlObj*)pPerl)->Perl_utf8_to_uv(s, retlen, checking);
 }
 
 #undef  Perl_uv_to_utf8
index ca2ba7c..5d5bc5f 100644 (file)
@@ -2355,19 +2355,19 @@ false, defined or undefined.  Does not handle 'get' magic.
 =for hackers
 Found in file sv.h
 
-=item SvTYPE
-
-Returns the type of the SV.  See C<svtype>.
+=item svtype
 
-       svtype  SvTYPE(SV* sv)
+An enum of flags for Perl types.  These are found in the file B<sv.h> 
+in the C<svtype> enum.  Test these flags with the C<SvTYPE> macro.
 
 =for hackers
 Found in file sv.h
 
-=item svtype
+=item SvTYPE
 
-An enum of flags for Perl types.  These are found in the file B<sv.h> 
-in the C<svtype> enum.  Test these flags with the C<SvTYPE> macro.
+Returns the type of the SV.  See C<svtype>.
+
+       svtype  SvTYPE(SV* sv)
 
 =for hackers
 Found in file sv.h
@@ -3182,18 +3182,10 @@ Found in file handy.h
 
 =item U8 *s
 
-Returns the character value of the first character in the string C<s>
-which is assumed to be in UTF8 encoding; C<retlen> will be set to the
-length, in bytes, of that character, and the pointer C<s> will be
-advanced to the end of the character.
-
-If C<s> does not point to a well-formed UTF8 character, the behaviour
-is dependent on the value of C<checking>: if this is true, it is
-assumed that the caller will raise a warning, and this function will
-set C<retlen> to C<-1> and return. If C<checking> is not true, an optional UTF8
-warning is produced.
+Returns true if first C<len> bytes of the given string form valid a UTF8
+string, false otherwise.
 
-       utf8_to_uv      U8 *s(I32 *retlen, I32 checking)
+       is_utf8_string  U8 *s(STRLEN len)
 
 =for hackers
 Found in file utf8.c
@@ -3210,6 +3202,24 @@ Returns zero on failure, setting C<len> to -1.
 =for hackers
 Found in file utf8.c
 
+=item utf8_to_uv
+
+Returns the character value of the first character in the string C<s>
+which is assumed to be in UTF8 encoding; C<retlen> will be set to the
+length, in bytes, of that character, and the pointer C<s> will be
+advanced to the end of the character.
+
+If C<s> does not point to a well-formed UTF8 character, the behaviour
+is dependent on the value of C<checking>: if this is true, it is
+assumed that the caller will raise a warning, and this function will
+set C<retlen> to C<-1> and return. If C<checking> is not true, an optional UTF8
+warning is produced.
+
+       U8* s   utf8_to_uv(I32 *retlen, I32 checking)
+
+=for hackers
+Found in file utf8.c
+
 =item warn
 
 This is the XSUB-writer's interface to Perl's C<warn> function.  Use this
diff --git a/utf8.c b/utf8.c
index d97a8b0..d23c9f7 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -159,7 +159,7 @@ Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len)
 }
 
 /*
-=for apidoc Am|utf8_to_uv|U8 *s|I32 *retlen|I32 checking
+=for apidoc Am|U8* s|utf8_to_uv|I32 *retlen|I32 checking
 
 Returns the character value of the first character in the string C<s>
 which is assumed to be in UTF8 encoding; C<retlen> will be set to the