mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-133740: Fix regression in locale.nl_langinfo(ALT_DIGITS) (GH-136237)
There is no need to temporary switch locale for items ALT_DIGITS and ERA if the nl_langinfo() result is empty (most locales).
This commit is contained in:
parent
8dc3383abe
commit
5c984ae35e
1 changed files with 1 additions and 1 deletions
|
@ -692,7 +692,7 @@ _locale_nl_langinfo_impl(PyObject *module, int item)
|
|||
result = result != NULL ? result : "";
|
||||
char *oldloc = NULL;
|
||||
if (langinfo_constants[i].category != LC_CTYPE
|
||||
&& (
|
||||
&& *result && (
|
||||
#ifdef __GLIBC__
|
||||
// gh-133740: Always change the locale for ALT_DIGITS and ERA
|
||||
# ifdef ALT_DIGITS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue