[Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.217,2.218
M.-A. Lemburg
lemburg@users.sourceforge.net
Thu, 26 Jul 2001 09:29:28 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Python atof.c,2.7,2.8 fmod.c,2.13,2.14 getmtime.c,2.16,2.17 hypot.c,2.3,2.4 pyfpe.c,2.6,2.7 strtod.c,1.10,1.11 thread.c,2.36,2.37
- Next message: [Python-checkins] CVS: python/nondist/peps pep-0228.txt,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv23389/Python
Modified Files:
bltinmodule.c
Log Message:
Undoing the UCS-4 patch addition which caused unichr() to return
surrogates for Unicode code points outside range(0x10000) on narrow
Python builds.
Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.217
retrieving revision 2.218
diff -C2 -d -r2.217 -r2.218
*** bltinmodule.c 2001/07/16 02:29:45 2.217
--- bltinmodule.c 2001/07/26 16:29:25 2.218
***************
*** 314,322 ****
return NULL;
if (x < 0 || x > 0x10ffff) {
PyErr_SetString(PyExc_ValueError,
! "unichr() arg not in range(0x110000)");
return NULL;
}
if (x <= 0xffff) {
--- 314,332 ----
return NULL;
+ #ifdef Py_UNICODE_WIDE
if (x < 0 || x > 0x10ffff) {
PyErr_SetString(PyExc_ValueError,
! "unichr() arg not in range(0x110000) "
! "(wide Python build)");
! return NULL;
! }
! #else
! if (x < 0 || x > 0xffff) {
! PyErr_SetString(PyExc_ValueError,
! "unichr() arg not in range(0x10000) "
! "(narrow Python build)");
return NULL;
}
+ #endif
if (x <= 0xffff) {
- Previous message: [Python-checkins] CVS: python/dist/src/Python atof.c,2.7,2.8 fmod.c,2.13,2.14 getmtime.c,2.16,2.17 hypot.c,2.3,2.4 pyfpe.c,2.6,2.7 strtod.c,1.10,1.11 thread.c,2.36,2.37
- Next message: [Python-checkins] CVS: python/nondist/peps pep-0228.txt,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]