This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Change static fcn name
authorKarl Williamson <khw@cpan.org>
Wed, 19 Jul 2017 17:34:08 +0000 (11:34 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 9 Nov 2017 02:50:29 +0000 (19:50 -0700)
The new name more closely reflects what it does

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

index 0212d02..527e476 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2738,7 +2738,7 @@ s |void   |new_collate    |NULLOK const char* newcoll
 s      |void   |new_ctype      |NN const char* newctype
 s      |void   |set_numeric_radix|const bool use_locale
 #    ifdef WIN32
-s      |char*  |my_setlocale   |int category|NULLOK const char* locale
+s      |char*  |win32_setlocale|int category|NULLOK const char* locale
 #    endif
 #    ifdef DEBUGGING
 s      |void   |print_collxfrm_input_and_return                \
diff --git a/embed.h b/embed.h
index fcaa235..a07d719 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define set_numeric_radix(a)   S_set_numeric_radix(aTHX_ a)
 #define stdize_locale(a)       S_stdize_locale(aTHX_ a)
 #      if defined(WIN32)
-#define my_setlocale(a,b)      S_my_setlocale(aTHX_ a,b)
+#define win32_setlocale(a,b)   S_win32_setlocale(aTHX_ a,b)
 #      endif
 #    endif
 #  endif
index 46b0ec6..a8240e2 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -742,8 +742,10 @@ S_new_collate(pTHX_ const char *newcoll)
 
 #else   /* WIN32 */
 
+#define my_setlocale(a,b) win32_setlocale(a,b)
+
 STATIC char *
-S_my_setlocale(pTHX_ int category, const char* locale)
+S_win32_setlocale(pTHX_ int category, const char* locale)
 {
     /* This, for Windows, emulates POSIX setlocale() behavior.  There is no
      * difference between the two unless the input locale is "", which normally
diff --git a/proto.h b/proto.h
index 1a83a36..d8c61e5 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -4638,7 +4638,7 @@ STATIC char*      S_stdize_locale(pTHX_ char* locs);
 #define PERL_ARGS_ASSERT_STDIZE_LOCALE \
        assert(locs)
 #    if defined(WIN32)
-STATIC char*   S_my_setlocale(pTHX_ int category, const char* locale);
+STATIC char*   S_win32_setlocale(pTHX_ int category, const char* locale);
 #    endif
 #  endif
 #endif