[Python-checkins] python/dist/src/Objects unicodeobject.c,2.140,2.141

tim_one@sourceforge.net tim_one@sourceforge.net
2002年4月20日 20:26:39 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv18503/python/objects
Modified Files:
	unicodeobject.c 
Log Message:
PyUnicode_EncodeUTF8: squash compiler wng. The difference of two
pointers is a signed type. Changing "allocated" to a signed int makes
undetected overflow more likely, but there was no overflow detection
before either.
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.140
retrieving revision 2.141
diff -C2 -d -r2.140 -r2.141
*** unicodeobject.c	20 Apr 2002 13:44:01 -0000	2.140
--- unicodeobject.c	21 Apr 2002 03:26:37 -0000	2.141
***************
*** 1173,1183 ****
 #endif
 
! PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s,
! 			 int size,
! 			 const char *errors)
 {
 PyObject *v;
 char *p;
! unsigned int allocated = 0;
 int i;
 
--- 1173,1184 ----
 #endif
 
! PyObject *
! PyUnicode_EncodeUTF8(const Py_UNICODE *s,
! 		 int size,
! 		 const char *errors)
 {
 PyObject *v;
 char *p;
! int allocated = 0;
 int i;
 

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