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

nascheme@sourceforge.net nascheme@sourceforge.net
Thu, 11 Apr 2002 20:06:56 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv18699/Objects

Modified Files:
	typeobject.c 
Log Message:
Change signature of _PyObject_GC_Malloc to match PyObject_MALLOC.
PyObject_Del and PyObject_GC_Del can now be used as a function
designators.


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.140
retrieving revision 2.141
diff -C2 -d -r2.140 -r2.141
*** typeobject.c	8 Apr 2002 01:38:42 -0000	2.140
--- typeobject.c	12 Apr 2002 03:06:53 -0000	2.141
***************
*** 191,195 ****
  
  	if (PyType_IS_GC(type))
! 		obj = _PyObject_GC_Malloc(type, nitems);
  	else
  		obj = PyObject_MALLOC(size);
--- 191,195 ----
  
  	if (PyType_IS_GC(type))
! 		obj = _PyObject_GC_Malloc(size);
  	else
  		obj = PyObject_MALLOC(size);
***************
*** 1188,1197 ****
  	type->tp_alloc = PyType_GenericAlloc;
  	if (type->tp_flags & Py_TPFLAGS_HAVE_GC) {
! 		type->tp_free = _PyObject_GC_Del;
  		type->tp_traverse = subtype_traverse;
  		type->tp_clear = base->tp_clear;
  	}
  	else
! 		type->tp_free = _PyObject_Del;
  
  	/* Initialize the rest */
--- 1188,1197 ----
  	type->tp_alloc = PyType_GenericAlloc;
  	if (type->tp_flags & Py_TPFLAGS_HAVE_GC) {
! 		type->tp_free = PyObject_GC_Del;
  		type->tp_traverse = subtype_traverse;
  		type->tp_clear = base->tp_clear;
  	}
  	else
! 		type->tp_free = PyObject_Del;
  
  	/* Initialize the rest */
***************
*** 1495,1499 ****
  	0,					/* tp_alloc */
  	type_new,				/* tp_new */
! 	_PyObject_GC_Del,			/* tp_free */
  	(inquiry)type_is_gc,			/* tp_is_gc */
  };
--- 1495,1499 ----
  	0,					/* tp_alloc */
  	type_new,				/* tp_new */
! 	PyObject_GC_Del,        		/* tp_free */
  	(inquiry)type_is_gc,			/* tp_is_gc */
  };
***************
*** 1710,1714 ****
  	PyType_GenericAlloc,			/* tp_alloc */
  	PyType_GenericNew,			/* tp_new */
! 	_PyObject_Del,				/* tp_free */
  };
  
--- 1710,1714 ----
  	PyType_GenericAlloc,			/* tp_alloc */
  	PyType_GenericNew,			/* tp_new */
! 	PyObject_Del,           		/* tp_free */
  };
  
***************
*** 4273,4276 ****
  	PyType_GenericAlloc,			/* tp_alloc */
  	PyType_GenericNew,			/* tp_new */
! 	_PyObject_GC_Del,			/* tp_free */
  };
--- 4273,4276 ----
  	PyType_GenericAlloc,			/* tp_alloc */
  	PyType_GenericNew,			/* tp_new */
! 	PyObject_GC_Del,        		/* tp_free */
  };