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
|
@ -68,7 +68,7 @@ Py_UNICODE _PyUnicode_ToTitlecase(register Py_UNICODE ch)
|
|||
else
|
||||
ch += ctype->upper;
|
||||
|
||||
#ifdef USE_UCS4_STORAGE
|
||||
#ifdef Py_UNICODE_WIDE
|
||||
/* The database assumes that the values wrap around at 0x10000. */
|
||||
if (ch > 0x10000)
|
||||
ch -= 0x10000;
|
||||
|
@ -360,7 +360,7 @@ Py_UNICODE _PyUnicode_ToUppercase(register Py_UNICODE ch)
|
|||
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
|
||||
ch += ctype->upper;
|
||||
#ifdef USE_UCS4_STORAGE
|
||||
#ifdef Py_UNICODE_WIDE
|
||||
/* The database assumes that the values wrap around at 0x10000. */
|
||||
if (ch > 0x10000)
|
||||
ch -= 0x10000;
|
||||
|
@ -376,7 +376,7 @@ Py_UNICODE _PyUnicode_ToLowercase(register Py_UNICODE ch)
|
|||
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
|
||||
ch += ctype->lower;
|
||||
#ifdef USE_UCS4_STORAGE
|
||||
#ifdef Py_UNICODE_WIDE
|
||||
/* The database assumes that the values wrap around at 0x10000. */
|
||||
if (ch > 0x10000)
|
||||
ch -= 0x10000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue