embed.fnc: Make _to_upper_title_latin1() avail to pp.c
authorKarl Williamson <public@khwilliamson.com>
Fri, 11 Nov 2011 18:03:35 +0000 (11:03 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 11 Nov 2011 20:31:00 +0000 (13:31 -0700)
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
embed.h
proto.h

index 446faf5..394e86a 100644 (file)
--- 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 (file)
--- a/embed.h
+++ b/embed.h
 #  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 (file)
--- 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)