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.
This commit is contained in:
Victor Stinner 2011-10-05 21:24:08 +02:00
parent 14f8f02826
commit c3cec7868b
4 changed files with 153 additions and 49 deletions

View file

@ -1851,6 +1851,7 @@ PyAPI_FUNC(Py_ssize_t) _PyUnicode_InsertThousandsGroupingLocale(Py_UNICODE *buff
see Objects/stringlib/localeutil.h */
#ifndef Py_LIMITED_API
PyAPI_FUNC(Py_ssize_t) _PyUnicode_InsertThousandsGrouping(
PyObject *unicode,
int kind,
void *buffer,
Py_ssize_t n_buffer,