mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
use Py_UNICODE_WIDE instead of USE_UCS4_STORAGE and Py_UNICODE_SIZE
tests.
This commit is contained in:
parent
3f8c2e1616
commit
8f4558583f
5 changed files with 18 additions and 16 deletions
|
@ -325,7 +325,7 @@ builtin_unichr(PyObject *self, PyObject *args)
|
|||
return PyUnicode_FromUnicode(s, 1);
|
||||
}
|
||||
else {
|
||||
#if Py_UNICODE_SIZE == 2
|
||||
#ifndef Py_UNICODE_WIDE
|
||||
/* UCS-4 character. store as two surrogate characters */
|
||||
x -= 0x10000L;
|
||||
s[0] = 0xD800 + (Py_UNICODE) (x >> 10);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue