diff options
author | Karl Williamson <khw@cpan.org> | 2022-10-04 20:32:38 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-10-10 13:12:22 -0600 |
commit | 885e92041b70376a643f6dacf2202291a4208753 (patch) | |
tree | 801c8c1c336925c322da96c9156341027482241c /locale.c | |
parent | 6e41334c05484cbb5dbbe855fcac262b943dc628 (diff) | |
download | perl-885e92041b70376a643f6dacf2202291a4208753.tar.gz |
locale.c: Windows special case NULL input first
This gets the trivial case out of the way, and can use plain setlocale,
as the locale string is non-existent, so doesn't need to handle
different character sets.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2593,7 +2593,11 @@ S_win32_setlocale(pTHX_ int category, const char* locale) * variable. */ - if (locale && strEQ(locale, "")) { + if (locale == NULL) { + return wrap_wsetlocale(category, NULL); + } + + if (strEQ(locale, "")) { /* Note this function may change the locale, but that's ok because we * are about to change it anyway */ locale = find_locale_from_environment(get_category_index(category, "")); |