This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
embed.fnc: Change fcn from A to X
authorKarl Williamson <khw@cpan.org>
Mon, 28 Aug 2017 23:51:06 +0000 (17:51 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 9 Nov 2017 03:52:52 +0000 (20:52 -0700)
This function is marked as accessible anywhere, but experimental, and
so is changeable at any time without notice, and its name begins with an
underscore to indicate its private nature.  I didn't know at the time I
wrote it that we have an existing mechanism to deal with functions whose
only use should be a public macro.  This changes to use that mechanism.

embed.fnc
embed.h
perl.h

index ea6608e..be12f88 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1270,7 +1270,7 @@ Xpn       |void   |_warn_problematic_locale
 p      |void   |new_numeric    |NULLOK const char* newcoll
 Xp     |void   |set_numeric_underlying
 Xp     |void   |set_numeric_standard
-ApM    |bool   |_is_in_locale_category|const bool compiling|const int category
+Xp     |bool   |_is_in_locale_category|const bool compiling|const int category
 Apd    |void   |sync_locale
 ApdO   |void   |require_pv     |NN const char* pv
 Apd    |void   |pack_cat       |NN SV *cat|NN const char *pat|NN const char *patend \
diff --git a/embed.h b/embed.h
index 078777a..ea05c91 100644 (file)
--- a/embed.h
+++ b/embed.h
@@ -28,7 +28,6 @@
 
 #define Gv_AMupdate(a,b)       Perl_Gv_AMupdate(aTHX_ a,b)
 #define _force_out_malformed_utf8_message(a,b,c,d)     Perl__force_out_malformed_utf8_message(aTHX_ a,b,c,d)
-#define _is_in_locale_category(a,b)    Perl__is_in_locale_category(aTHX_ a,b)
 #define _is_uni_FOO(a,b)       Perl__is_uni_FOO(aTHX_ a,b)
 #define _is_uni_perl_idcont(a) Perl__is_uni_perl_idcont(aTHX_ a)
 #define _is_uni_perl_idstart(a)        Perl__is_uni_perl_idstart(aTHX_ a)
 #ifdef PERL_CORE
 #define Slab_Alloc(a)          Perl_Slab_Alloc(aTHX_ a)
 #define Slab_Free(a)           Perl_Slab_Free(aTHX_ a)
+#define _is_in_locale_category(a,b)    Perl__is_in_locale_category(aTHX_ a,b)
 #define _warn_problematic_locale       Perl__warn_problematic_locale
 #define abort_execution(a,b)   Perl_abort_execution(aTHX_ a,b)
 #define alloc_LOGOP(a,b,c)     Perl_alloc_LOGOP(aTHX_ a,b,c)
diff --git a/perl.h b/perl.h
index f12fec8..21b0a75 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -5502,10 +5502,10 @@ typedef struct am_table_short AMTS;
 
 #   define IN_LC_COMPILETIME(category)                                       \
        (IN_LC_ALL_COMPILETIME || (IN_LC_PARTIAL_COMPILETIME                  \
-                                  && _is_in_locale_category(TRUE, (category))))
+                  && Perl__is_in_locale_category(aTHX_ TRUE, (category))))
 #   define IN_LC_RUNTIME(category)                                           \
        (IN_LC_ALL_RUNTIME || (IN_LC_PARTIAL_RUNTIME                          \
-                              && _is_in_locale_category(FALSE, (category))))
+                  && Perl__is_in_locale_category(aTHX_ FALSE, (category))))
 #   define IN_LC(category)  \
                     (IN_LC_COMPILETIME(category) || IN_LC_RUNTIME(category))