Permalink
Browse files

locale.c: Add const to several variables

  • Loading branch information...
khwilliamson committed Jan 2, 2018
1 parent d1238ca commit 98ad049c9cce3b946836cbb1438993c6c2093cc8
Showing with 5 additions and 5 deletions.
  1. +5 −5 locale.c
View
@@ -1885,11 +1885,11 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
&& strNE("0", bad_lang_use_once)))));
bool done = FALSE;
/* setlocale() return vals; not copied so must be looked at immediately */
char * sl_result[NOMINAL_LC_ALL_INDEX + 1];
const char * sl_result[NOMINAL_LC_ALL_INDEX + 1];
/* current locale for given category; should have been copied so aren't
* volatile */
char * curlocales[NOMINAL_LC_ALL_INDEX + 1];
const char * curlocales[NOMINAL_LC_ALL_INDEX + 1];
char * locale_param;
@@ -2976,7 +2976,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
* English, it comes down to if the locale's name ends in something like
* "UTF-8". It errs on the side of not being a UTF-8 locale. */
char *save_input_locale = NULL;
const char *save_input_locale = NULL;
STRLEN final_pos;
# ifdef LC_ALL
@@ -3414,7 +3414,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
final_pos = strlen(save_input_locale) - 1;
if (final_pos >= 3) {
char *name = save_input_locale;
const char *name = save_input_locale;
/* Find next 'U' or 'u' and look from there */
while ((name += strcspn(name, "Uu") + 1)
@@ -3586,7 +3586,7 @@ Perl_my_strerror(pTHX_ const int errnum)
# else
char * save_locale = NULL;
const char * save_locale = NULL;
bool locale_is_C = FALSE;
/* We have a critical section to prevent another thread from changing the

0 comments on commit 98ad049

Please sign in to comment.