This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlguts: Clarify an example.
authorKarl Williamson <khw@cpan.org>
Sun, 4 Mar 2018 00:27:48 +0000 (17:27 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 4 Mar 2018 00:30:24 +0000 (17:30 -0700)
pod/perlguts.pod

index 5d11da6..5dce945 100644 (file)
@@ -2909,10 +2909,13 @@ so you can test if you need to do something special with this
 character like this (the C<UTF8_IS_INVARIANT()> is a macro that tests
 whether the byte is encoded as a single byte even in UTF-8):
 
 character like this (the C<UTF8_IS_INVARIANT()> is a macro that tests
 whether the byte is encoded as a single byte even in UTF-8):
 
-    U8 *utf;
-    U8 *utf_end; /* 1 beyond buffer pointed to by utf */
-    UV uv;     /* Note: a UV, not a U8, not a char */
-    STRLEN len; /* length of character in bytes */
+    U8 *utf;     /* Initialize this to point to the beginning of the
+                    sequence to convert */
+    U8 *utf_end; /* Initialize this to 1 beyond the end of the sequence
+                    pointed to by 'utf' */
+    UV uv;      /* Returned code point; note: a UV, not a U8, not a
+                    char */
+    STRLEN len; /* Returned length of character in bytes */
 
     if (!UTF8_IS_INVARIANT(*utf))
         /* Must treat this as UTF-8 */
 
     if (!UTF8_IS_INVARIANT(*utf))
         /* Must treat this as UTF-8 */