[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.16.8.34,2.16.8.35

Guido van Rossum gvanrossum@users.sourceforge.net
Wed, 06 Jun 2001 12:00:35 -0700


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

Modified Files:
      Tag: descr-branch
	typeobject.c 
Log Message:
Bugfix in type_init(): when merging the dicts of multiple base
classes, don't call d1.update(d2) when d2 is NULL!


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.16.8.34
retrieving revision 2.16.8.35
diff -C2 -r2.16.8.34 -r2.16.8.35
*** typeobject.c	2001/06/06 17:17:14	2.16.8.34
--- typeobject.c	2001/06/06 19:00:33	2.16.8.35
***************
*** 368,371 ****
--- 368,373 ----
  		for (i = n; --i >= 0; ) {
  			t = (PyTypeObject *) PyTuple_GET_ITEM(bases, i);
+ 			if (t->tp_dict == NULL)
+ 				continue;
  			x = PyObject_CallMethod(type->tp_dict,
  						"update", "O", t->tp_dict);