diff options
-rw-r--r-- | intrpvar.h | 2 | ||||
-rw-r--r-- | locale.c | 22 |
2 files changed, 7 insertions, 17 deletions
diff --git a/intrpvar.h b/intrpvar.h index ac912acd5a..fd25e68e2a 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -757,7 +757,7 @@ PERLVARI(I, collation_standard, bool, TRUE) /* Assume simple collation */ #endif /* USE_LOCALE_COLLATE */ -PERLVARI(I, langinfo_buf, char *, NULL) +PERLVARI(I, langinfo_buf, const char *, NULL) PERLVARI(I, langinfo_bufsize, Size_t, 0) PERLVARI(I, setlocale_buf, const char *, NULL) PERLVARI(I, setlocale_bufsize, Size_t, 0) @@ -3156,9 +3156,7 @@ S_my_langinfo(const nl_item item, bool toggle) /* Copy to a per-thread buffer, which is also one that won't be * destroyed by a subsequent setlocale(), such as the * RESTORE_LC_NUMERIC may do just below. */ - retval = save_to_buffer(nl_langinfo(item), - ((const char **) &PL_langinfo_buf), - &PL_langinfo_bufsize); + retval = save_to_buffer(nl_langinfo(item), &PL_langinfo_buf, &PL_langinfo_bufsize); NL_LANGINFO_UNLOCK; if (toggle) { @@ -3187,9 +3185,7 @@ S_my_langinfo(const nl_item item, bool toggle) /* We have to save it to a buffer, because the freelocale() just below * can invalidate the internal one */ - retval = save_to_buffer(nl_langinfo_l(item, cur), - ((const char **) &PL_langinfo_buf), - &PL_langinfo_bufsize); + retval = save_to_buffer(nl_langinfo_l(item, cur), &PL_langinfo_buf, &PL_langinfo_bufsize); } # endif @@ -3275,8 +3271,7 @@ S_my_langinfo(const nl_item item, bool toggle) : '+'; retval = save_to_buffer(Perl_form(aTHX_ "%c%s", precedes, currency), - ((const char **) &PL_langinfo_buf), - &PL_langinfo_bufsize); + &PL_langinfo_buf, &PL_langinfo_bufsize); } # ifdef TS_W32_BROKEN_LOCALECONV @@ -3417,9 +3412,7 @@ S_my_langinfo(const nl_item item, bool toggle) } } - retval = save_to_buffer(temp, - ((const char **) &PL_langinfo_buf), - &PL_langinfo_bufsize); + retval = save_to_buffer(temp, &PL_langinfo_buf, &PL_langinfo_bufsize); # ifdef TS_W32_BROKEN_LOCALECONV @@ -3548,8 +3541,7 @@ S_my_langinfo(const nl_item item, bool toggle) * time, it all works */ const char * temp = my_strftime(format, 30, 30, hour, mday, mon, 2011, 0, 0, 0); - retval = save_to_buffer(temp, (const char **) &PL_langinfo_buf, - &PL_langinfo_bufsize); + retval = save_to_buffer(temp, &PL_langinfo_buf, &PL_langinfo_bufsize); Safefree(temp); /* If the item is 'ALT_DIGITS', 'PL_langinfo_buf' contains the @@ -3628,9 +3620,7 @@ S_my_langinfo(const nl_item item, bool toggle) /* Use everything past the dot */ retval++; - retval = save_to_buffer(retval, - ((const char **) &PL_langinfo_buf), - &PL_langinfo_bufsize); + retval = save_to_buffer(retval, &PL_langinfo_buf, &PL_langinfo_bufsize); } break; |