diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2001-06-27 18:59:43 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2001-06-27 18:59:43 (GMT) |
commit | 8f4558583f3b7e2d98e13baec06c2f43c9e6a723 (patch) | |
tree | e0fbd260591171ba41e443fd38b90b61210be03a /Include/unicodeobject.h | |
parent | 3f8c2e1616f1d67730ffef40f3077247dfe46e26 (diff) | |
download | cpython-8f4558583f3b7e2d98e13baec06c2f43c9e6a723.zip cpython-8f4558583f3b7e2d98e13baec06c2f43c9e6a723.tar.gz cpython-8f4558583f3b7e2d98e13baec06c2f43c9e6a723.tar.bz2 |
use Py_UNICODE_WIDE instead of USE_UCS4_STORAGE and Py_UNICODE_SIZE
tests.
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r-- | Include/unicodeobject.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index d89537f..205b8bb 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -66,10 +66,11 @@ Copyright (c) Corporation for National Research Initiatives. #error Must define Py_UNICODE_SIZE #endif -/* experimental UCS-4 support. enable at your own risk! */ -#undef USE_UCS4_STORAGE -#if Py_UNICODE_SIZE == 4 -#define USE_UCS4_STORAGE +/* Setting Py_UNICODE_WIDE enables UCS-4 storage. Otherwise, Unicode + strings are stored as UCS-2 (with limited support for UTF-16) */ + +#if Py_UNICODE_SIZE >= 4 +#define Py_UNICODE_WIDE #endif /* Set these flags if the platform has "wchar.h", "wctype.h" and the @@ -81,12 +82,12 @@ Copyright (c) Corporation for National Research Initiatives. #ifndef PY_UNICODE_TYPE /* Windows has a usable wchar_t type (unless we're using UCS-4) */ -# if defined(MS_WIN32) && !defined(USE_UCS4_STORAGE) +# if defined(MS_WIN32) && Py_UNICODE_SIZE == 2 # define HAVE_USABLE_WCHAR_T # define PY_UNICODE_TYPE wchar_t # endif -# if defined(USE_UCS4_STORAGE) +# if defined(Py_UNICODE_WIDE) # define PY_UNICODE_TYPE Py_UCS4 # endif |