summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-15 23:48:33 -0700
committerKarl Williamson <khw@cpan.org>2019-10-15 23:49:43 -0700
commitf2c50040ce0dcb4f046ea35d05bb9f5ebc7cdb11 (patch)
tree8deb9c95c4b0c5446747be577c1b31c4e0b4abde /utf8.h
parent9786385e68f7f14df6f4dd0f04d2c72c0d9a2511 (diff)
downloadperl-f2c50040ce0dcb4f046ea35d05bb9f5ebc7cdb11.tar.gz
Document UTF8_MAXBYTES_CASE
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/utf8.h b/utf8.h
index 8868efb5d0..ded581a0c9 100644
--- a/utf8.h
+++ b/utf8.h
@@ -426,14 +426,24 @@ encoded as UTF-8. C<cp> is a native (ASCII or EBCDIC) code point if less than
* continuation byte */
#define MAX_PORTABLE_UTF8_TWO_BYTE (32 * (1U << 5) - 1)
-/* The maximum number of UTF-8 bytes a single Unicode character can
- * uppercase/lowercase/fold into. Unicode guarantees that the maximum
- * expansion is UTF8_MAX_FOLD_CHAR_EXPAND characters, but any above-Unicode
- * code point will fold to itself, so we only have to look at the expansion of
- * the maximum Unicode code point. But this number may be less than the space
- * occupied by a very large code point under Perl's extended UTF-8. We have to
- * make it large enough to fit any single character. (It turns out that ASCII
- * and EBCDIC differ in which is larger) */
+/*
+
+=for apidoc AmnU|STRLEN|UTF8_MAXBYTES_CASE
+
+The maximum number of UTF-8 bytes a single Unicode character can
+uppercase/lowercase/titlecase/fold into.
+
+=cut
+
+ * Unicode guarantees that the maximum expansion is UTF8_MAX_FOLD_CHAR_EXPAND
+ * characters, but any above-Unicode code point will fold to itself, so we only
+ * have to look at the expansion of the maximum Unicode code point. But this
+ * number may be less than the space occupied by a very large code point under
+ * Perl's extended UTF-8. We have to make it large enough to fit any single
+ * character. (It turns out that ASCII and EBCDIC differ in which is larger)
+ *
+=cut
+*/
#define UTF8_MAXBYTES_CASE \
(UTF8_MAXBYTES >= (UTF8_MAX_FOLD_CHAR_EXPAND * OFFUNISKIP(0x10FFFF)) \
? UTF8_MAXBYTES \