From 348bf2e01788f1715b43ed8a3d76553f8ca3aa1a Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 11 Nov 2011 11:03:35 -0700 Subject: [PATCH] embed.fnc: Make _to_upper_title_latin1() avail to pp.c If something like this were to be made more generally available, it would be better to have two in-line functions, to_upper_latin1() and to_title_latin1() that just call this underlying one with the correct final parameter. --- embed.fnc | 4 +++- embed.h | 4 +++- proto.h | 14 ++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/embed.fnc b/embed.fnc index 446faf5..394e86a 100644 --- a/embed.fnc +++ b/embed.fnc @@ -602,9 +602,11 @@ Ap |UV |to_uni_upper |UV c|NN U8 *p|NN STRLEN *lenp Ap |UV |to_uni_title |UV c|NN U8 *p|NN STRLEN *lenp #ifdef PERL_IN_UTF8_C sR |U8 |to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp -p |UV |_to_upper_title_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const char S_or_s p |UV |_to_fold_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const U8 flags #endif +#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C) +p |UV |_to_upper_title_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const char S_or_s +#endif Ap |UV |to_uni_lower |UV c|NN U8 *p|NN STRLEN *lenp Amp |UV |to_uni_fold |UV c|NN U8 *p|NN STRLEN *lenp AMp |UV |_to_uni_fold_flags|UV c|NN U8 *p|NN STRLEN *lenp|U8 flags diff --git a/embed.h b/embed.h index 8540031..4aada86 100644 --- a/embed.h +++ b/embed.h @@ -1572,12 +1572,14 @@ # endif # if defined(PERL_IN_UTF8_C) #define _to_fold_latin1(a,b,c,d) Perl__to_fold_latin1(aTHX_ a,b,c,d) -#define _to_upper_title_latin1(a,b,c,d) Perl__to_upper_title_latin1(aTHX_ a,b,c,d) #define is_utf8_char_slow S_is_utf8_char_slow #define is_utf8_common(a,b,c) S_is_utf8_common(aTHX_ a,b,c) #define swash_get(a,b,c) S_swash_get(aTHX_ a,b,c) #define to_lower_latin1(a,b,c) S_to_lower_latin1(aTHX_ a,b,c) # endif +# if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C) +#define _to_upper_title_latin1(a,b,c,d) Perl__to_upper_title_latin1(aTHX_ a,b,c,d) +# endif # if defined(PERL_IN_UTIL_C) #define ckwarn_common(a) S_ckwarn_common(aTHX_ a) #define closest_cop(a,b) S_closest_cop(aTHX_ a,b) diff --git a/proto.h b/proto.h index 534fab8..b5747f6 100644 --- a/proto.h +++ b/proto.h @@ -6989,12 +6989,6 @@ PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, con #define PERL_ARGS_ASSERT__TO_FOLD_LATIN1 \ assert(p); assert(lenp) -PERL_CALLCONV UV Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s) - __attribute__nonnull__(pTHX_2) - __attribute__nonnull__(pTHX_3); -#define PERL_ARGS_ASSERT__TO_UPPER_TITLE_LATIN1 \ - assert(p); assert(lenp) - STATIC STRLEN S_is_utf8_char_slow(const U8 *s, const STRLEN len) __attribute__warn_unused_result__ __attribute__nonnull__(1); @@ -7019,6 +7013,14 @@ STATIC U8 S_to_lower_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp) __attribute__warn_unused_result__; #endif +#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C) +PERL_CALLCONV UV Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT__TO_UPPER_TITLE_LATIN1 \ + assert(p); assert(lenp) + +#endif #if defined(PERL_IN_UTIL_C) STATIC bool S_ckwarn_common(pTHX_ U32 w); STATIC const COP* S_closest_cop(pTHX_ const COP *cop, const OP *o) -- 2.7.4