This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change name of internal function
authorKarl Williamson <khw@cpan.org>
Mon, 28 Aug 2017 23:43:29 +0000 (17:43 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 9 Nov 2017 03:52:52 +0000 (20:52 -0700)
Following on the previous commit, this changes the name of the function
that changes the variable to be in sync with it.

embed.fnc
embed.h
locale.c
perl.h
proto.h

index edd6659..ea6608e 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1268,7 +1268,7 @@ ApOM      |int    |init_i18nl14n  |int printwarn
 p      |char*  |my_strerror    |const int errnum
 Xpn    |void   |_warn_problematic_locale
 p      |void   |new_numeric    |NULLOK const char* newcoll
-Xp     |void   |set_numeric_local
+Xp     |void   |set_numeric_underlying
 Xp     |void   |set_numeric_standard
 ApM    |bool   |_is_in_locale_category|const bool compiling|const int category
 Apd    |void   |sync_locale
diff --git a/embed.h b/embed.h
index a07d719..078777a 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define scalar(a)              Perl_scalar(aTHX_ a)
 #define scalarvoid(a)          Perl_scalarvoid(aTHX_ a)
 #define set_caret_X()          Perl_set_caret_X(aTHX)
-#define set_numeric_local()    Perl_set_numeric_local(aTHX)
 #define set_numeric_standard() Perl_set_numeric_standard(aTHX)
+#define set_numeric_underlying()       Perl_set_numeric_underlying(aTHX)
 #define sub_crush_depth(a)     Perl_sub_crush_depth(aTHX_ a)
 #define sv_2num(a)             Perl_sv_2num(aTHX_ a)
 #define sv_clean_all()         Perl_sv_clean_all(aTHX)
index 36522ee..4d93217 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -201,8 +201,8 @@ Perl_new_numeric(pTHX_ const char *newnum)
      * It installs this locale as the current underlying default.
      *
      * The default locale and the C locale can be toggled between by use of the
-     * set_numeric_local() and set_numeric_standard() functions, which should
-     * probably not be called directly, but only via macros like
+     * set_numeric_underlying() and set_numeric_standard() functions, which
+     * should probably not be called directly, but only via macros like
      * SET_NUMERIC_STANDARD() in perl.h.
      *
      * The toggling is necessary mainly so that a non-dot radix decimal point
@@ -289,7 +289,7 @@ Perl_set_numeric_standard(pTHX)
 }
 
 void
-Perl_set_numeric_local(pTHX)
+Perl_set_numeric_underlying(pTHX)
 {
 
 #ifdef USE_LOCALE_NUMERIC
diff --git a/perl.h b/perl.h
index c9ed7a7..f12fec8 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -5690,14 +5690,14 @@ expression, but with an empty argument list, like this:
 #  define STORE_LC_NUMERIC_SET_TO_NEEDED()                                  \
     if (IN_LC(LC_NUMERIC)) {                                                \
         if (_NOT_IN_NUMERIC_UNDERLYING) {                                   \
-            Perl_set_numeric_local(aTHX);                                   \
+            Perl_set_numeric_underlying(aTHX);                              \
             _restore_LC_NUMERIC_function = &Perl_set_numeric_standard;      \
         }                                                                   \
     }                                                                       \
     else {                                                                  \
         if (_NOT_IN_NUMERIC_STANDARD) {                                     \
             SET_NUMERIC_STANDARD();                                         \
-            _restore_LC_NUMERIC_function = &Perl_set_numeric_local;         \
+            _restore_LC_NUMERIC_function = &Perl_set_numeric_underlying;    \
         }                                                                   \
     }
 
@@ -5715,26 +5715,26 @@ expression, but with an empty argument list, like this:
 
 #  define SET_NUMERIC_UNDERLYING()                                          \
        STMT_START { if (_NOT_IN_NUMERIC_UNDERLYING)                        \
-                                Perl_set_numeric_local(aTHX); } STMT_END
+                            Perl_set_numeric_underlying(aTHX); } STMT_END
 
 /* The rest of these LC_NUMERIC macros toggle to one or the other state, with
  * the RESTORE_foo ones called to switch back, but only if need be */
 #  define STORE_LC_NUMERIC_UNDERLYING_SET_STANDARD()                        \
-       bool _was_local = _NOT_IN_NUMERIC_STANDARD;                         \
-       if (_was_local) Perl_set_numeric_standard(aTHX);
+       bool _was_underlying = _NOT_IN_NUMERIC_STANDARD;                         \
+       if (_was_underlying) Perl_set_numeric_standard(aTHX);
 
 /* Doesn't change to underlying locale unless within the scope of some form of
  * 'use locale'.  This is the usual desired behavior. */
 #  define STORE_LC_NUMERIC_STANDARD_SET_UNDERLYING()        \
        bool _was_standard = _NOT_IN_NUMERIC_UNDERLYING                     \
                             && IN_LC(LC_NUMERIC);                           \
-       if (_was_standard) Perl_set_numeric_local(aTHX);
+       if (_was_standard) Perl_set_numeric_underlying(aTHX);
 
 /* Rarely, we want to change to the underlying locale even outside of 'use
  * locale'.  This is principally in the POSIX:: functions */
 #  define STORE_LC_NUMERIC_FORCE_TO_UNDERLYING()            \
     if (_NOT_IN_NUMERIC_UNDERLYING) {                                       \
-        Perl_set_numeric_local(aTHX);                                       \
+        Perl_set_numeric_underlying(aTHX);                                       \
         _restore_LC_NUMERIC_function = &Perl_set_numeric_standard;          \
     }
 
@@ -5753,8 +5753,8 @@ expression, but with an empty argument list, like this:
                 }                                           \
             } STMT_END
 
-#  define RESTORE_LC_NUMERIC_UNDERLYING()                   \
-       if (_was_local) Perl_set_numeric_local(aTHX);
+#  define RESTORE_LC_NUMERIC_UNDERLYING()                       \
+       if (_was_underlying) Perl_set_numeric_underlying(aTHX);
 
 #  define RESTORE_LC_NUMERIC_STANDARD()                     \
     if (_restore_LC_NUMERIC_function) {                     \
diff --git a/proto.h b/proto.h
index 1af9126..bc24aee 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -2925,8 +2925,8 @@ PERL_CALLCONV void        Perl_set_caret_X(pTHX);
 PERL_CALLCONV void     Perl_set_context(void *t);
 #define PERL_ARGS_ASSERT_SET_CONTEXT   \
        assert(t)
-PERL_CALLCONV void     Perl_set_numeric_local(pTHX);
 PERL_CALLCONV void     Perl_set_numeric_standard(pTHX);
+PERL_CALLCONV void     Perl_set_numeric_underlying(pTHX);
 PERL_CALLCONV void     Perl_setdefout(pTHX_ GV* gv);
 #define PERL_ARGS_ASSERT_SETDEFOUT     \
        assert(gv)