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

M.-A. Lemburg lemburg@users.sourceforge.net
2001年6月07日 05:26:59 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv12368
Modified Files:
	unicodeobject.c 
Log Message:
Fixes [ #430986 ] Buglet in PyUnicode_FromUnicode.
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.92
retrieving revision 2.93
diff -C2 -r2.92 -r2.93
*** unicodeobject.c	2001年05月29日 17:13:15	2.92
--- unicodeobject.c	2001年06月07日 12:26:56	2.93
***************
*** 298,304 ****
 	 if (!unicode) {
 		unicode = _PyUnicode_New(1);
- 		unicode->str[0] = *u;
 		if (!unicode)
 		 return NULL;
 		unicode_latin1[*u] = unicode;
 	 }
--- 298,304 ----
 	 if (!unicode) {
 		unicode = _PyUnicode_New(1);
 		if (!unicode)
 		 return NULL;
+ 		unicode->str[0] = *u;
 		unicode_latin1[*u] = unicode;
 	 }

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