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

Tim Peters tim_one@users.sourceforge.net
Thu, 13 Sep 2001 12:18:29 -0700


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

Modified Files:
	typeobject.c 
Log Message:
type_call():  Change in policy.  The keyword args (if any) are now passed
on to the tp_new slot (if non-NULL), as well as to the tp_init slot (if
any).  A sane type implementing both tp_new and tp_init should probably
pay attention to the arguments in only one of them.


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.58
retrieving revision 2.59
diff -C2 -d -r2.58 -r2.59
*** typeobject.c	2001/09/08 04:00:12	2.58
--- typeobject.c	2001/09/13 19:18:27	2.59
***************
*** 152,156 ****
  	}
  
! 	obj = type->tp_new(type, args, NULL);
  	if (obj != NULL) {
  		type = obj->ob_type;
--- 152,156 ----
  	}
  
! 	obj = type->tp_new(type, args, kwds);
  	if (obj != NULL) {
  		type = obj->ob_type;