diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-05 19:24:08 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-05 19:24:08 (GMT) |
commit | c3cec7868bf1019c0987f1e9aadb56d73fa93d61 (patch) | |
tree | 93e0ee3984bff06fd50e8643fc5de11402b81671 /Python | |
parent | 14f8f02826bc270b2a0dab2ff2efc8ce88fd9dc0 (diff) | |
download | cpython-c3cec7868bf1019c0987f1e9aadb56d73fa93d61.zip cpython-c3cec7868bf1019c0987f1e9aadb56d73fa93d61.tar.gz cpython-c3cec7868bf1019c0987f1e9aadb56d73fa93d61.tar.bz2 |
Add asciilib: similar to ucs1, ucs2 and ucs4 library, but specialized to ASCII
ucs1, ucs2 and ucs4 libraries have to scan created substring to find the
maximum character, whereas it is not need to ASCII strings. Because ASCII
strings are common, it is useful to optimize ASCII.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/formatter_unicode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index 609df64..c989d83 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -501,7 +501,7 @@ calc_number_widths(NumberFieldWidths *spec, Py_ssize_t n_prefix, spec->n_grouped_digits = 0; else spec->n_grouped_digits = _PyUnicode_InsertThousandsGrouping( - PyUnicode_1BYTE_KIND, NULL, 0, NULL, + NULL, PyUnicode_1BYTE_KIND, NULL, 0, NULL, spec->n_digits, spec->n_min_width, locale->grouping, locale->thousands_sep); @@ -603,7 +603,7 @@ fill_number(PyObject *out, Py_ssize_t pos, const NumberFieldWidths *spec, r = #endif _PyUnicode_InsertThousandsGrouping( - kind, + out, kind, (char*)data + PyUnicode_KIND_SIZE(kind, pos), spec->n_grouped_digits, pdigits + PyUnicode_KIND_SIZE(kind, d_pos), |