diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-11-26 14:17:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 14:17:01 +0100 |
commit | 6f5fa1b4be735159e964906ab608dc467476e47c (patch) | |
tree | 334f91923d65f214145651f007320590ee3ec13e /Include | |
parent | e88553c3742507ba83590ecca44ae7f134f38410 (diff) | |
download | cpython-git-6f5fa1b4be735159e964906ab608dc467476e47c.tar.gz |
bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623) (GH-10718)
Fix str.format(), float.__format__() and complex.__format__() methods
for non-ASCII decimal point when using the "n" formatter.
Rewrite _PyUnicode_InsertThousandsGrouping(): it now requires
a _PyUnicodeWriter object for the buffer and a Python str object
for digits.
(cherry picked from commit 59423e3ddd736387cef8f7632c71954c1859bed0)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/unicodeobject.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 0274de6733..45998a13a6 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -2135,10 +2135,10 @@ PyAPI_FUNC(PyObject *) _PyUnicode_XStrip( see Objects/stringlib/localeutil.h */ #ifndef Py_LIMITED_API PyAPI_FUNC(Py_ssize_t) _PyUnicode_InsertThousandsGrouping( - PyObject *unicode, - Py_ssize_t index, + _PyUnicodeWriter *writer, Py_ssize_t n_buffer, - void *digits, + PyObject *digits, + Py_ssize_t d_pos, Py_ssize_t n_digits, Py_ssize_t min_width, const char *grouping, |