Skip to content

Commit

Permalink
locale.c: Shorten static function name
Browse files Browse the repository at this point in the history
The extra syllable(s) are unnecessary noise
  • Loading branch information
khwilliamson committed May 5, 2021
1 parent cfb6c36 commit bf1a54f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions embed.fnc
Expand Up @@ -3220,9 +3220,9 @@ ST |unsigned int|get_category_index|const int category|NULLOK const char * local
S |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale
S |void |restore_switched_locale|const int category|NULLOK const char * const original_locale
# ifdef HAS_NL_LANGINFO
ST |const char*|my_nl_langinfo|const nl_item item|bool toggle
ST |const char*|my_langinfo|const nl_item item|bool toggle
# else
ST |const char*|my_nl_langinfo|const int item|bool toggle
ST |const char*|my_langinfo|const int item|bool toggle
# endif
iTR |const char *|save_to_buffer|NULLOK const char * string \
|NULLOK const char **buf \
Expand Down
4 changes: 2 additions & 2 deletions embed.h
Expand Up @@ -1505,7 +1505,7 @@
# if !(defined(HAS_NL_LANGINFO))
# if defined(PERL_IN_LOCALE_C)
# if defined(USE_LOCALE)
#define my_nl_langinfo S_my_nl_langinfo
#define my_langinfo S_my_langinfo
# endif
# endif
# endif
Expand Down Expand Up @@ -1615,7 +1615,7 @@
# if defined(HAS_NL_LANGINFO)
# if defined(PERL_IN_LOCALE_C)
# if defined(USE_LOCALE)
#define my_nl_langinfo S_my_nl_langinfo
#define my_langinfo S_my_langinfo
# endif
# endif
# endif
Expand Down
20 changes: 10 additions & 10 deletions locale.c
Expand Up @@ -1511,7 +1511,7 @@ S_set_numeric_radix(pTHX_ const bool use_locale)
|| defined(HAS_SOME_LANGINFO))

const char * radix = (use_locale)
? my_nl_langinfo(RADIXCHAR, FALSE)
? my_langinfo(RADIXCHAR, FALSE)
/* FALSE => already in dest locale */
: C_decimal_point;

Expand Down Expand Up @@ -1607,13 +1607,13 @@ S_new_numeric(pTHX_ const char *newnum)
# ifndef TS_W32_BROKEN_LOCALECONV

/* If its name isn't C nor POSIX, it could still be indistinguishable from
* them. But on broken Windows systems calling my_nl_langinfo() for
* them. But on broken Windows systems calling my_langinfo() for
* THOUSEP can currently (but rarely) cause a race, so avoid doing that,
* and just always change the locale if not C nor POSIX on those systems */
if (! PL_numeric_standard) {
PL_numeric_standard = cBOOL(strEQ(C_decimal_point, my_nl_langinfo(RADIXCHAR,
PL_numeric_standard = cBOOL(strEQ(C_decimal_point, my_langinfo(RADIXCHAR,
FALSE /* Don't toggle locale */ ))
&& strEQ(C_thousands_sep, my_nl_langinfo(THOUSEP, FALSE)));
&& strEQ(C_thousands_sep, my_langinfo(THOUSEP, FALSE)));
}

# endif
Expand Down Expand Up @@ -1993,7 +1993,7 @@ S_new_ctype(pTHX_ const char *newctype)

Perl_sv_catpvf(aTHX_ PL_warn_locale, "; codeset=%s",
/* parameter FALSE is a don't care here */
my_nl_langinfo(CODESET, FALSE));
my_langinfo(CODESET, FALSE));

# endif

Expand Down Expand Up @@ -2944,7 +2944,7 @@ Perl_langinfo(const int item)

#else

return my_nl_langinfo(item, TRUE);
return my_langinfo(item, TRUE);

#endif

Expand All @@ -2954,9 +2954,9 @@ Perl_langinfo(const int item)

STATIC const char *
# ifdef HAS_SOME_LANGINFO
S_my_nl_langinfo(const nl_item item, bool toggle)
S_my_langinfo(const nl_item item, bool toggle)
# else
S_my_nl_langinfo(const int item, bool toggle)
S_my_langinfo(const int item, bool toggle)
# endif
{

Expand Down Expand Up @@ -5033,7 +5033,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
defective locale definition. XXX We should probably check for
these in the Latin1 range and warn (but on glibc, requires
iswalnum() etc. due to their not handling 80-FF correctly */
const char *codeset = my_nl_langinfo(CODESET, FALSE);
const char *codeset = my_langinfo(CODESET, FALSE);
/* FALSE => already in dest locale */

DEBUG_Lv(PerlIO_printf(Perl_debug_log,
Expand Down Expand Up @@ -5103,7 +5103,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
save_input_locale);
bool only_ascii = FALSE;
const U8 * currency_string
= (const U8 *) my_nl_langinfo(CRNCYSTR, FALSE);
= (const U8 *) my_langinfo(CRNCYSTR, FALSE);
/* 2nd param not relevant for this item */
const U8 * first_variant;

Expand Down
8 changes: 4 additions & 4 deletions proto.h
Expand Up @@ -4220,8 +4220,8 @@ PERL_CALLCONV const char* Perl_langinfo(const int item);
#if !(defined(HAS_NL_LANGINFO))
# if defined(PERL_IN_LOCALE_C)
# if defined(USE_LOCALE)
STATIC const char* S_my_nl_langinfo(const int item, bool toggle);
#define PERL_ARGS_ASSERT_MY_NL_LANGINFO
STATIC const char* S_my_langinfo(const int item, bool toggle);
#define PERL_ARGS_ASSERT_MY_LANGINFO
# endif
# endif
#endif
Expand Down Expand Up @@ -4699,8 +4699,8 @@ PERL_CALLCONV I32 Perl_do_shmio(pTHX_ I32 optype, SV** mark, SV** sp);
#if defined(HAS_NL_LANGINFO)
# if defined(PERL_IN_LOCALE_C)
# if defined(USE_LOCALE)
STATIC const char* S_my_nl_langinfo(const nl_item item, bool toggle);
#define PERL_ARGS_ASSERT_MY_NL_LANGINFO
STATIC const char* S_my_langinfo(const nl_item item, bool toggle);
#define PERL_ARGS_ASSERT_MY_LANGINFO
# endif
# endif
#endif
Expand Down

0 comments on commit bf1a54f

Please sign in to comment.