[Python-checkins] python/dist/src/Objects typeobject.c,2.262,2.263

loewis at users.sourceforge.net loewis at users.sourceforge.net
Wed Aug 18 15:16:58 CEST 2004


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6387

Modified Files:
	typeobject.c 
Log Message:
Patch #980082: Missing INCREF in PyType_Ready.


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.262
retrieving revision 2.263
diff -C2 -d -r2.262 -r2.263
*** typeobject.c	3 Aug 2004 10:21:02 -0000	2.262
--- typeobject.c	18 Aug 2004 13:16:54 -0000	2.263
***************
*** 3144,3149 ****
  	/* Initialize tp_base (defaults to BaseObject unless that's us) */
  	base = type->tp_base;
! 	if (base == NULL && type != &PyBaseObject_Type)
  		base = type->tp_base = &PyBaseObject_Type;
  
  	/* Initialize the base class */
--- 3144,3151 ----
  	/* Initialize tp_base (defaults to BaseObject unless that's us) */
  	base = type->tp_base;
! 	if (base == NULL && type != &PyBaseObject_Type) {
  		base = type->tp_base = &PyBaseObject_Type;
+ 		Py_INCREF(base);
+ 	}
  
  	/* Initialize the base class */



More information about the Python-checkins mailing list