[Python-checkins] CVS: python/dist/src/Objects object.c,2.162.6.1,2.162.6.2

Michael Hudson mwh@users.sourceforge.net
2002年3月05日 07:41:42 -0800


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv16797
Modified Files:
 Tag: release22-maint
	object.c 
Log Message:
Backport the bits of Guido's fix for
SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects
that Tim didn't later back out.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.162.6.1
retrieving revision 2.162.6.2
diff -C2 -d -r2.162.6.1 -r2.162.6.2
*** object.c	5 Mar 2002 14:23:56 -0000	2.162.6.1
--- object.c	5 Mar 2002 15:41:40 -0000	2.162.6.2
***************
*** 1192,1197 ****
 		return NULL;
 	if (dictoffset < 0) {
! 		const size_t size = _PyObject_VAR_SIZE(tp,
! 					((PyVarObject *)obj)->ob_size);
 		dictoffset += (long)size;
 		assert(dictoffset > 0);
--- 1192,1203 ----
 		return NULL;
 	if (dictoffset < 0) {
! 		int tsize;
! 		size_t size;
! 
! 		tsize = ((PyVarObject *)obj)->ob_size;
! 		if (tsize < 0)
! 			tsize = -tsize;
! 		size = _PyObject_VAR_SIZE(tp, tsize);
! 
 		dictoffset += (long)size;
 		assert(dictoffset > 0);

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