[Python-checkins] CVS: python/dist/src/Objects object.c,2.135,2.136 typeobject.c,2.22,2.23

Guido van Rossum gvanrossum@users.sourceforge.net
Tue, 07 Aug 2001 10:24:30 -0700


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

Modified Files:
	object.c typeobject.c 
Log Message:
- Rename PyType_InitDict() to PyType_Ready().

- Add an explicit call to PyType_Ready(&PyList_Type) to pythonrun.c
  (just for the heck of it, really -- we should either explicitly
  ready all types, or none).



Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.135
retrieving revision 2.136
diff -C2 -d -r2.135 -r2.136
*** object.c	2001/08/02 04:15:00	2.135
--- object.c	2001/08/07 17:24:28	2.136
***************
*** 1161,1165 ****
  
  	if (tp->tp_dict == NULL) {
! 		if (PyType_InitDict(tp) < 0)
  			return NULL;
  	}
--- 1161,1165 ----
  
  	if (tp->tp_dict == NULL) {
! 		if (PyType_Ready(tp) < 0)
  			return NULL;
  	}
***************
*** 1208,1212 ****
  
  	if (tp->tp_dict == NULL) {
! 		if (PyType_InitDict(tp) < 0)
  			return -1;
  	}
--- 1208,1212 ----
  
  	if (tp->tp_dict == NULL) {
! 		if (PyType_Ready(tp) < 0)
  			return -1;
  	}

Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -d -r2.22 -r2.23
*** typeobject.c	2001/08/07 16:40:56	2.22
--- typeobject.c	2001/08/07 17:24:28	2.23
***************
*** 388,392 ****
  		}
  		if (base_i->tp_dict == NULL) {
! 			if (PyType_InitDict(base_i) < 0)
  				return NULL;
  		}
--- 388,392 ----
  		}
  		if (base_i->tp_dict == NULL) {
! 			if (PyType_Ready(base_i) < 0)
  				return NULL;
  		}
***************
*** 657,661 ****
  
  	/* Initialize the rest */
! 	if (PyType_InitDict(type) < 0) {
  		Py_DECREF(type);
  		return NULL;
--- 657,661 ----
  
  	/* Initialize the rest */
! 	if (PyType_Ready(type) < 0) {
  		Py_DECREF(type);
  		return NULL;
***************
*** 720,724 ****
  	/* Initialize this type (we'll assume the metatype is initialized) */
  	if (type->tp_dict == NULL) {
! 		if (PyType_InitDict(type) < 0)
  			return NULL;
  	}
--- 720,724 ----
  	/* Initialize this type (we'll assume the metatype is initialized) */
  	if (type->tp_dict == NULL) {
! 		if (PyType_Ready(type) < 0)
  			return NULL;
  	}
***************
*** 1158,1162 ****
  
  int
! PyType_InitDict(PyTypeObject *type)
  {
  	PyObject *dict, *bases, *x;
--- 1158,1162 ----
  
  int
! PyType_Ready(PyTypeObject *type)
  {
  	PyObject *dict, *bases, *x;
***************
*** 1186,1190 ****
  	/* Initialize the base class */
  	if (base && base->tp_dict == NULL) {
! 		if (PyType_InitDict(base) < 0)
  			return -1;
  	}
--- 1186,1190 ----
  	/* Initialize the base class */
  	if (base && base->tp_dict == NULL) {
! 		if (PyType_Ready(base) < 0)
  			return -1;
  	}
***************
*** 1893,1897 ****
  }
  
! /* This function is called by PyType_InitDict() to populate the type's
     dictionary with method descriptors for function slots.  For each
     function slot (like tp_repr) that's defined in the type, one or
--- 1893,1897 ----
  }
  
! /* This function is called by PyType_Ready() to populate the type's
     dictionary with method descriptors for function slots.  For each
     function slot (like tp_repr) that's defined in the type, one or
***************
*** 2336,2340 ****
  
  /* This is called at the very end of type_new() (even after
!    PyType_InitDict()) to complete the initialization of dynamic types.
     The dict argument is the dictionary argument passed to type_new(),
     which is the local namespace of the class statement, in other
--- 2336,2340 ----
  
  /* This is called at the very end of type_new() (even after
!    PyType_Ready()) to complete the initialization of dynamic types.
     The dict argument is the dictionary argument passed to type_new(),
     which is the local namespace of the class statement, in other