mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale() (from the locale encoding), instead of decoding them implicitly from latin1 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum character if unicode is NULL * Replace MIN/MAX macros by Py_MIN/Py_MAX * stringlib/undef.h undefines STRINGLIB_IS_UNICODE * stringlib/localeutil.h only supports Unicode
This commit is contained in:
parent
dcb30cf959
commit
41a863cb81
12 changed files with 187 additions and 150 deletions
|
|
@ -25,7 +25,5 @@
|
|||
#define STRINGLIB_CHECK PyBytes_Check
|
||||
#define STRINGLIB_CHECK_EXACT PyBytes_CheckExact
|
||||
#define STRINGLIB_TOSTR PyObject_Str
|
||||
#define STRINGLIB_GROUPING _PyBytes_InsertThousandsGrouping
|
||||
#define STRINGLIB_GROUPING_LOCALE _PyBytes_InsertThousandsGroupingLocale
|
||||
#define STRINGLIB_TOASCII PyObject_Repr
|
||||
#endif /* !STRINGLIB_STRINGDEFS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue