summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-10-06 09:12:59 -0600
committerKarl Williamson <khw@cpan.org>2022-10-10 13:12:22 -0600
commit5c686f46a71fe960e9455ae428b50955d6c6fdb1 (patch)
treec7e880ff22a5ad3b62f10f7e7c3cc4e561dac365 /locale.c
parent75a5e20987c7503631ba7baa0d0f0b8671ad4ced (diff)
downloadperl-5c686f46a71fe960e9455ae428b50955d6c6fdb1.tar.gz
locale.c: Make win32_setlocale return const *
Add a bit of safety, and makes it correspond to the other setlocale returns we use.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/locale.c b/locale.c
index c5ae1f5daa..55936d6277 100644
--- a/locale.c
+++ b/locale.c
@@ -2572,7 +2572,7 @@ S_wrap_wsetlocale(pTHX_ const int category, const char *locale)
return result;
}
-STATIC char *
+STATIC const char *
S_win32_setlocale(pTHX_ int category, const char* locale)
{
/* This, for Windows, emulates POSIX setlocale() behavior. There is no
@@ -2603,7 +2603,7 @@ S_win32_setlocale(pTHX_ int category, const char* locale)
const char * result = wrap_wsetlocale(category, locale);
DEBUG_L(PerlIO_printf(Perl_debug_log, "%s\n",
setlocale_debug_string_r(category, locale, result)));
- return (char *) result;
+ return result;
}
#endif