diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-01-08 14:59:13 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-08 15:41:48 -0700 |
commit | 0c9b04389335c3a662232102a5a5a570e4e7c403 (patch) | |
tree | d048f9801ea1ddd45e1dfd4a6ca746f1fb74ab63 /mathoms.c | |
parent | 37271a18911d76ceba26a1ee38cbd598fdd19ad4 (diff) | |
download | perl-0c9b04389335c3a662232102a5a5a570e4e7c403.tar.gz |
need backwards-compatile to_utf8_foo()
These 4 functions have been replaced by variants to_utf8_foo_flags(),
but for XS code that called the old ones in the Perl_to_utf8_foo()
forms, backwards compatibility versions need to be created.
For calls of just the to_utf8_foo() forms, macros have been used to
automatically call the new forms without the performance penalty of
going through the compatibility functions.
Diffstat (limited to 'mathoms.c')
-rw-r--r-- | mathoms.c | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -83,6 +83,10 @@ PERL_CALLCONV I32 Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2); PERL_CALLCONV char * Perl_sv_collxfrm(pTHX_ SV *const sv, STRLEN *const nxp); PERL_CALLCONV bool Perl_sv_2bool(pTHX_ register SV *const sv); PERL_CALLCONV CV * Perl_newSUB(pTHX_ I32 floor, OP* o, OP* proto, OP* block); +PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp); +PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp); +PERL_CALLCONV UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp); +PERL_CALLCONV UV Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp); /* ref() is now a macro using Perl_doref; * this version provided for binary compatibility only. @@ -1159,6 +1163,39 @@ Perl_newSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *block) { return Perl_newATTRSUB(aTHX_ floor, o, proto, NULL, block); } + +UV +Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_FOLD; + + return _to_utf8_fold_flags(p, ustrp, lenp, FOLD_FLAGS_FULL, NULL); +} + +UV +Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_LOWER; + + return _to_utf8_lower_flags(p, ustrp, lenp, FALSE, NULL); +} + +UV +Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_TITLE; + + return _to_utf8_title_flags(p, ustrp, lenp, FALSE, NULL); +} + +UV +Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_UPPER; + + return _to_utf8_upper_flags(p, ustrp, lenp, FALSE, NULL); +} + #endif /* NO_MATHOMS */ /* |