[Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.19,2.20

Tim Peters tim_one@users.sourceforge.net
2001年10月06日 01:03:22 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv13468/python/Modules
Modified Files:
	gcmodule.c 
Log Message:
_PyObject_GC_Malloc(): split a complicated line in two. As is, there was
no way to talk the debugger into showing me how many bytes were being
allocated.
Index: gcmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -d -r2.19 -r2.20
*** gcmodule.c	2001年08月30日 00:05:51	2.19
--- gcmodule.c	2001年10月06日 08:03:20	2.20
***************
*** 803,808 ****
 	PyObject *op;
 #ifdef WITH_CYCLE_GC
! 	PyGC_Head *g = PyObject_MALLOC(_PyObject_VAR_SIZE(tp, size) +
! 						sizeof(PyGC_Head));
 	if (g == NULL)
 		return (PyObject *)PyErr_NoMemory();
--- 803,809 ----
 	PyObject *op;
 #ifdef WITH_CYCLE_GC
! 	const size_t nbytes = sizeof(PyGC_Head) +
! 			 (size_t)_PyObject_VAR_SIZE(tp, size);
! 	PyGC_Head *g = PyObject_MALLOC(nbytes);						
 	if (g == NULL)
 		return (PyObject *)PyErr_NoMemory();

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