utf8.c: Use proper Unicode property names
authorKarl Williamson <public@khwilliamson.com>
Sat, 5 Nov 2011 17:31:47 +0000 (11:31 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 8 Nov 2011 15:09:35 +0000 (08:09 -0700)
There are five functions in utf8.c that look up Unicode maps--the case
changing functions.  They look up these maps under the names ToDigit,
ToFold, ToLower, ToTitle, and ToUpper.  The imminent expansion of Unicode::UCD
to return the mappings for all properties creates a naming conflict, as
three of those names are the same as other properties, Upper, Lower, and
Title.

It was an unfortunate choice of names originally.  Now mktables has been
changed to create a list of mapping properties that utf8_heavy.pl reads.
It uses the official names of those properties, so change utf8.c to
correspond.

utf8.c

diff --git a/utf8.c b/utf8.c
index 9b42c75..25d0fa7 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -1993,7 +1993,7 @@ Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
     PERL_ARGS_ASSERT_TO_UTF8_UPPER;
 
     return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
-                             &PL_utf8_toupper, "ToUpper", "utf8::ToSpecUpper");
+                             &PL_utf8_toupper, "Touc", "utf8::ToSpecUpper");
 }
 
 /*
@@ -2017,7 +2017,7 @@ Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
     PERL_ARGS_ASSERT_TO_UTF8_TITLE;
 
     return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
-                             &PL_utf8_totitle, "ToTitle", "utf8::ToSpecTitle");
+                             &PL_utf8_totitle, "ToTc", "utf8::ToSpecTitle");
 }
 
 /*
@@ -2041,7 +2041,7 @@ Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
     PERL_ARGS_ASSERT_TO_UTF8_LOWER;
 
     return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
-                             &PL_utf8_tolower, "ToLower", "utf8::ToSpecLower");
+                             &PL_utf8_tolower, "Tolc", "utf8::ToSpecLower");
 }
 
 /*
@@ -2071,7 +2071,7 @@ Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags)
     PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS;
 
     return Perl_to_utf8_case(aTHX_ p, ustrp, lenp,
-                             &PL_utf8_tofold, "ToFold", specials);
+                             &PL_utf8_tofold, "Tocf", specials);
 }
 
 /* Note: