[Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.101,2.102

Guido van Rossum gvanrossum@users.sourceforge.net
2001年7月20日 09:36:23 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv10657
Modified Files:
	unicodeobject.c 
Log Message:
#ifdef out generation of \U escapes unless Py_UNICODE_WIDE. This
#caused warnings with the VMS C compiler. (SF bug #442998, in part.)
On a narrow system the current code should never be executed since ch
will always be < 0x10000.
Marc-Andre: you may end up fixing this a different way, since I
believe you have plans to generate \U for surrogate pairs. I'll leave
that to you.
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.101
retrieving revision 2.102
diff -C2 -r2.101 -r2.102
*** unicodeobject.c	2001年06月27日 18:59:43	2.101
--- unicodeobject.c	2001年07月20日 16:36:21	2.102
***************
*** 1442,1445 ****
--- 1442,1446 ----
 *p++ = (char) ch;
 } 
+ #ifdef Py_UNICODE_WIDE
 /* Map 21-bit characters to '\U00xxxxxx' */
 else if (ch >= 0x10000) {
***************
*** 1455,1458 ****
--- 1456,1460 ----
 *p++ = hexdigit[ch & 15];
 }
+ #endif
 /* Map 16-bit characters to '\uxxxx' */
 else if (ch >= 256) {

AltStyle によって変換されたページ (->オリジナル) /