[Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.48,2.49

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Wed, 23 Feb 2000 10:47:19 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Objects
In directory weyr:/home/fdrake/projects/python/Objects

Modified Files:
	dictobject.c 
Log Message:

dict_has_key():  Accept only one parameter.  PR#210 reported by
                 Andreas Jung <ajung@sz-sb.de>.


Index: dictobject.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Objects/dictobject.c,v
retrieving revision 2.48
retrieving revision 2.49
diff -C2 -r2.48 -r2.49
*** dictobject.c	1999/03/24 19:06:42	2.48
--- dictobject.c	2000/02/23 15:47:16	2.49
***************
*** 960,964 ****
  	long hash;
  	register long ok;
! 	if (!PyArg_Parse(args, "O", &key))
  		return NULL;
  #ifdef CACHE_HASH
--- 960,964 ----
  	long hash;
  	register long ok;
! 	if (!PyArg_ParseTuple(args, "O:has_key", &key))
  		return NULL;
  #ifdef CACHE_HASH
***************
*** 985,989 ****
  	long hash;
  
! 	if (!PyArg_ParseTuple(args, "O|O", &key, &failobj))
  		return NULL;
  	if (mp->ma_table == NULL)
--- 985,989 ----
  	long hash;
  
! 	if (!PyArg_ParseTuple(args, "O|O:get", &key, &failobj))
  		return NULL;
  	if (mp->ma_table == NULL)
***************
*** 1022,1026 ****
  
  static PyMethodDef mapp_methods[] = {
! 	{"has_key",	(PyCFunction)dict_has_key},
  	{"keys",	(PyCFunction)dict_keys},
  	{"items",	(PyCFunction)dict_items},
--- 1022,1026 ----
  
  static PyMethodDef mapp_methods[] = {
! 	{"has_key",	(PyCFunction)dict_has_key,      METH_VARARGS},
  	{"keys",	(PyCFunction)dict_keys},
  	{"items",	(PyCFunction)dict_items},
***************
*** 1029,1033 ****
  	{"clear",	(PyCFunction)dict_clear},
  	{"copy",	(PyCFunction)dict_copy},
! 	{"get",         (PyCFunction)dict_get, 1},
  	{NULL,		NULL}		/* sentinel */
  };
--- 1029,1033 ----
  	{"clear",	(PyCFunction)dict_clear},
  	{"copy",	(PyCFunction)dict_copy},
! 	{"get",         (PyCFunction)dict_get,          METH_VARARGS},
  	{NULL,		NULL}		/* sentinel */
  };