diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-10-05 00:33:31 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-10-05 00:33:31 (GMT) |
commit | e7f90375b175ed9e610a1de3b5c910f9271375ad (patch) | |
tree | aaa4d1c1f7079d7f687407d2373f43f184030531 /Objects | |
parent | 1929407406966f9f2093a9e6b421cad39361dbb4 (diff) | |
download | cpython-e7f90375b175ed9e610a1de3b5c910f9271375ad.zip cpython-e7f90375b175ed9e610a1de3b5c910f9271375ad.tar.gz cpython-e7f90375b175ed9e610a1de3b5c910f9271375ad.tar.bz2 |
#16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 87ac044..e90ee3f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5772,18 +5772,12 @@ PyUnicode_AsUnicodeEscapeString(PyObject *unicode) void *data; Py_ssize_t expandsize = 0; - /* Initial allocation is based on the longest-possible unichr + /* Initial allocation is based on the longest-possible character escape. - In wide (UTF-32) builds '\U00xxxxxx' is 10 chars per source - unichr, so in this case it's the longest unichr escape. In - narrow (UTF-16) builds this is five chars per source unichr - since there are two unichrs in the surrogate pair, so in narrow - (UTF-16) builds it's not the longest unichr escape. - - In wide or narrow builds '\uxxxx' is 6 chars per source unichr, - so in the narrow (UTF-16) build case it's the longest unichr - escape. + For UCS1 strings it's '\xxx', 4 bytes per source character. + For UCS2 strings it's '\uxxxx', 6 bytes per source character. + For UCS4 strings it's '\U00xxxxxx', 10 bytes per source character. */ if (!PyUnicode_Check(unicode)) { |