[Python-checkins] python/dist/src/Objects funcobject.c,2.61,2.62

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Tue, 06 May 2003 02:01:44 -0700


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

Modified Files:
	funcobject.c 
Log Message:
SF bug #692959:  new.function ignores keyword arguments



Index: funcobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v
retrieving revision 2.61
retrieving revision 2.62
diff -C2 -d -r2.61 -r2.62
*** funcobject.c	8 Apr 2003 21:28:47 -0000	2.61
--- funcobject.c	6 May 2003 09:01:41 -0000	2.62
***************
*** 317,322 ****
  	PyFunctionObject *newfunc;
  	int nfree, nclosure;
  
! 	if (!PyArg_ParseTuple(args, "O!O!|OOO:function",
  			      &PyCode_Type, &code,
  			      &PyDict_Type, &globals,
--- 317,325 ----
  	PyFunctionObject *newfunc;
  	int nfree, nclosure;
+ 	static char *kwlist[] = {"code", "globals", "name",
+ 				 "argdefs", "closure", 0};
  
! 	if (!PyArg_ParseTupleAndKeywords(args, kw, "O!O!|OOO:function",
! 			      kwlist,
  			      &PyCode_Type, &code,
  			      &PyDict_Type, &globals,