From 2f6025090092c5c796cc6dd0ed672c7c79140338 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 26 Mar 2023 20:32:53 -0600 Subject: [PATCH] locale.c: Remove one-off macro This was used to prevent an unnecessary copy. But the next commit will change the macro it was avoiding to not always do the copy. That will avoid more copies than this would. The copy that results will still be unnecessary in some cases, but there is a net gain. --- locale.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/locale.c b/locale.c index 5befcdc5c0e7..0d1e82ed49b9 100644 --- a/locale.c +++ b/locale.c @@ -1228,8 +1228,6 @@ S_less_dicey_bool_setlocale_r(pTHX_ const int cat, const char * locale) # include # endif -# define my_querylocale_c(cat) querylocale_2008_i(cat##_INDEX_) - STATIC const char * S_querylocale_2008_i(pTHX_ const unsigned int index) { @@ -1775,7 +1773,7 @@ S_bool_setlocale_2008_i(pTHX_ /* Invalidate the glibc cache of loaded translations if the locale has * changed, see [perl #134264] */ if (old_messages_locale) { - if (strNE(old_messages_locale, my_querylocale_c(LC_MESSAGES))) { + if (strNE(old_messages_locale, querylocale_c(LC_MESSAGES))) { textdomain(textdomain(NULL)); } }