This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove deprecated function 'to_utf8_case()'
authorKarl Williamson <khw@cpan.org>
Wed, 10 May 2017 14:29:46 +0000 (08:29 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 1 Jun 2017 14:34:44 +0000 (08:34 -0600)
This is keeping with the schedule for 5.28.

embed.fnc
embed.h
pod/perldelta.pod
pod/perldeprecation.pod
proto.h
utf8.c

index bb107fa..69e5051 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1705,12 +1705,6 @@ EXMp     |void   |_invlist_dump  |NN PerlIO *file|I32 level   \
 #endif
 Ap     |void   |taint_env
 Ap     |void   |taint_proper   |NULLOK const char* f|NN const char *const s
-ApdD   |UV     |to_utf8_case   |NN const U8 *p                                 \
-                               |NN U8* ustrp                                   \
-                               |NULLOK STRLEN *lenp                            \
-                               |NN SV **swashp                                 \
-                               |NN const char *normal|                         \
-                               NULLOK const char *special
 pM     |char * |_byte_dump_string                                      \
                                |NN const U8 * s                        \
                                |const STRLEN len                       \
diff --git a/embed.h b/embed.h
index 54b8fbd..79614b1 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define to_uni_title_lc(a)     Perl_to_uni_title_lc(aTHX_ a)
 #define to_uni_upper(a,b,c)    Perl_to_uni_upper(aTHX_ a,b,c)
 #define to_uni_upper_lc(a)     Perl_to_uni_upper_lc(aTHX_ a)
-#define to_utf8_case(a,b,c,d,e,f)      Perl_to_utf8_case(aTHX_ a,b,c,d,e,f)
 #define unpack_str(a,b,c,d,e,f,g,h)    Perl_unpack_str(aTHX_ a,b,c,d,e,f,g,h)
 #define unpackstring(a,b,c,d,e)        Perl_unpackstring(aTHX_ a,b,c,d,e)
 #define unsharepvn(a,b,c)      Perl_unsharepvn(aTHX_ a,b,c)
index 1a83f22..3901f6a 100644 (file)
@@ -356,6 +356,11 @@ well.
 
 The C<PL_statbuf> interpreter variable has been removed.
 
+=item *
+
+The deprecated function C<to_utf8_case()>, accessible from XS code, has
+been removed.
+
 =back
 
 =head1 Selected Bug Fixes
index b13483e..9be93a1 100644 (file)
@@ -393,7 +393,7 @@ was deprecated in Perl 5.24, and will be fatal in Perl 5.28.
 
 =head3 In XS code, use of C<to_utf8_case()>
 
-This function is being removed; instead convert to call
+This function has been removed as of Perl 5.28; instead convert to call
 the appropriate one of:
 L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>.
 L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>,
diff --git a/proto.h b/proto.h
index f605643..b581ffd 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -3515,11 +3515,6 @@ PERL_CALLCONV U32        Perl_to_uni_upper_lc(pTHX_ U32 c)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV UV       Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_TO_UTF8_CASE  \
-       assert(p); assert(ustrp); assert(swashp); assert(normal)
-
 #ifndef NO_MATHOMS
 PERL_CALLCONV UV       Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__deprecated__;
diff --git a/utf8.c b/utf8.c
index abbc6ae..d87af86 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2744,62 +2744,6 @@ Perl__is_utf8_mark(pTHX_ const U8 *p)
     return is_utf8_common(p, &PL_utf8_mark, "IsM", NULL);
 }
 
-/*
-=for apidoc to_utf8_case
-
-Instead use the appropriate one of L</toUPPER_utf8_safe>,
-L</toTITLE_utf8_safe>,
-L</toLOWER_utf8_safe>,
-or L</toFOLD_utf8_safe>.
-
-This function will be removed in Perl v5.28.
-
-C<p> contains the pointer to the UTF-8 string encoding
-the character that is being converted.  This routine assumes that the character
-at C<p> is well-formed.
-
-C<ustrp> is a pointer to the character buffer to put the
-conversion result to.  C<lenp> is a pointer to the length
-of the result.
-
-C<swashp> is a pointer to the swash to use.
-
-Both the special and normal mappings are stored in F<lib/unicore/To/Foo.pl>,
-and loaded by C<SWASHNEW>, using F<lib/utf8_heavy.pl>.  C<special> (usually,
-but not always, a multicharacter mapping), is tried first.
-
-C<special> is a string, normally C<NULL> or C<"">.  C<NULL> means to not use
-any special mappings; C<""> means to use the special mappings.  Values other
-than these two are treated as the name of the hash containing the special
-mappings, like C<"utf8::ToSpecLower">.
-
-C<normal> is a string like C<"ToLower"> which means the swash
-C<%utf8::ToLower>.
-
-Code points above the platform's C<IV_MAX> will raise a deprecation warning,
-unless those are turned off.
-
-=cut */
-
-UV
-Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp,
-                       SV **swashp, const char *normal, const char *special)
-{
-    STRLEN len_cp;
-    UV cp;
-    const U8 * e = p + UTF8SKIP(p);
-
-    PERL_ARGS_ASSERT_TO_UTF8_CASE;
-
-    cp = utf8n_to_uvchr(p, e - p, &len_cp, UTF8_CHECK_ONLY);
-    if (len_cp == (STRLEN) -1) {
-        _force_out_malformed_utf8_message(p, e,
-                                   _UTF8_NO_CONFIDENCE_IN_CURLEN, 1 /* Die */ );
-    }
-
-    return _to_utf8_case(cp, p, ustrp, lenp, swashp, normal, special);
-}
-
     /* change namve uv1 to 'from' */
 STATIC UV
 S__to_utf8_case(pTHX_ const UV uv1, const U8 *p, U8* ustrp, STRLEN *lenp,