diff options
author | Karl Williamson <khw@cpan.org> | 2022-10-04 20:39:02 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-10-10 13:12:22 -0600 |
commit | 29dd0ffa727c58df0c83446b61a7f9e2cb79a179 (patch) | |
tree | 5d9f35c4017ef84ec2cc72cc2dbf2c96411482e5 /locale.c | |
parent | aaafe4fdfab4795864042a20a574d759051bf5dc (diff) | |
download | perl-29dd0ffa727c58df0c83446b61a7f9e2cb79a179.tar.gz |
Add wrap_wsetlocale() to embed.fnc
This makes the calls to it cleaner.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2500,6 +2500,8 @@ Perl_Win_wstring_to_utf8_string(const wchar_t * wstring) STATIC char * S_wrap_wsetlocale(pTHX_ int category, const char *locale) { + PERL_ARGS_ASSERT_WRAP_WSETLOCALE; + wchar_t *wlocale = NULL; wchar_t *wresult; char *result; @@ -2587,7 +2589,7 @@ S_win32_setlocale(pTHX_ int category, const char* locale) } #ifdef USE_WSETLOCALE - result = S_wrap_wsetlocale(aTHX_ category, locale); + result = wrap_wsetlocale(category, locale); #else result = setlocale(category, locale); #endif @@ -2608,7 +2610,7 @@ S_win32_setlocale(pTHX_ int category, const char* locale) result = PerlEnv_getenv(category_names[i]); if (result && strNE(result, "")) { #ifdef USE_WSETLOCALE - S_wrap_wsetlocale(aTHX_ categories[i], result); + wrap_wsetlocale(categories[i], result); #else setlocale(categories[i], result); #endif @@ -5050,7 +5052,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) * use wrap_wsetlocale(). */ const char *system_default_locale = stdize_locale(LC_ALL, - S_wrap_wsetlocale(aTHX_ LC_ALL, ""), + wrap_wsetlocale(LC_ALL, ""), &PL_stdize_locale_buf, &PL_stdize_locale_bufsize, __LINE__); |