diff options
author | Karl Williamson <khw@cpan.org> | 2022-11-07 10:40:50 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-12-05 11:55:10 -0700 |
commit | e0d608ea87b7e010cacab39dff7d44986525e9d2 (patch) | |
tree | 7d575845a17c9aa0db43f692161db5226bc2bd68 /locale.c | |
parent | 2a9ab842f968d5b791dda641c9aff2396fd1f024 (diff) | |
download | perl-e0d608ea87b7e010cacab39dff7d44986525e9d2.tar.gz |
locale.c: Use wrap_wsetlocale on Windows
This was the final remaining use of plain setlocale() on Windows. All
others have been converted to wrap_wsetlocale, introduced in
6c3320363f6cd734c66a25852aac87e4f2538215.
There is no issue with the input name in this instance, since it is NULL
and not a character string, but it occurred to me that the locale name
returned by the function could be problematic. _wsetlocale() should be
safe in all cases.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2665,7 +2665,7 @@ S_win32_setlocale(pTHX_ int category, const char* locale) PL_cur_LC_ALL = savepv(result); } else { - PL_cur_LC_ALL = savepv(setlocale(LC_ALL, NULL)); + PL_cur_LC_ALL = savepv(wrap_wsetlocale(LC_ALL, NULL)); } # endif |