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

Tim Peters python-dev@python.org
Tue, 4 Jul 2000 10:44:50 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv12647/python/dist/src/Objects

Modified Files:
	dictobject.c 
Log Message:
Removed Py_PROTO and switched to ANSI C declarations in the dict
implementation.  This was really to test whether my new CVS+SSH
setup is more usable than the old one -- and turns out it is (for
whatever reason, it was impossible to do a commit before that
involved more than one directory).


Index: dictobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v
retrieving revision 2.58
retrieving revision 2.59
diff -C2 -r2.58 -r2.59
*** dictobject.c	2000/07/01 01:00:38	2.58
--- dictobject.c	2000/07/04 17:44:48	2.59
***************
*** 131,140 ****
  Jyrki Alakuijala and Vladimir Marangozov.)
  */
- static dictentry *lookdict Py_PROTO((dictobject *, PyObject *, long));
  static dictentry *
! lookdict(mp, key, hash)
! 	dictobject *mp;
! 	PyObject *key;
! 	register long hash;
  {
  	register int i;
--- 131,136 ----
  Jyrki Alakuijala and Vladimir Marangozov.)
  */
  static dictentry *
! lookdict(dictobject *mp, PyObject *key, register long hash)
  {
  	register int i;
***************
*** 200,211 ****
  Eats a reference to key and one to value.
  */
- static void insertdict
- 	Py_PROTO((dictobject *, PyObject *, long, PyObject *));
  static void
! insertdict(mp, key, hash, value)
! 	register dictobject *mp;
! 	PyObject *key;
! 	long hash;
! 	PyObject *value;
  {
  	PyObject *old_value;
--- 196,201 ----
  Eats a reference to key and one to value.
  */
  static void
! insertdict(register dictobject *mp, PyObject *key, long hash, PyObject *value)
  {
  	PyObject *old_value;
***************
*** 235,243 ****
  actually be smaller than the old one.
  */
- static int dictresize Py_PROTO((dictobject *, int));
  static int
! dictresize(mp, minused)
! 	dictobject *mp;
! 	int minused;
  {
  	register int oldsize = mp->ma_size;
--- 225,230 ----
  actually be smaller than the old one.
  */
  static int
! dictresize(dictobject *mp, int minused)
  {
  	register int oldsize = mp->ma_size;
***************
*** 288,294 ****
  
  PyObject *
! PyDict_GetItem(op, key)
! 	PyObject *op;
! 	PyObject *key;
  {
  	long hash;
--- 275,279 ----
  
  PyObject *
! PyDict_GetItem(PyObject *op, PyObject *key)
  {
  	long hash;
***************
*** 313,320 ****
  
  int
! PyDict_SetItem(op, key, value)
! 	register PyObject *op;
! 	PyObject *key;
! 	PyObject *value;
  {
  	register dictobject *mp;
--- 298,302 ----
  
  int
! PyDict_SetItem(register PyObject *op, PyObject *key, PyObject *value)
  {
  	register dictobject *mp;
***************
*** 361,367 ****
  
  int
! PyDict_DelItem(op, key)
! 	PyObject *op;
! 	PyObject *key;
  {
  	register dictobject *mp;
--- 343,347 ----
  
  int
! PyDict_DelItem(PyObject *op, PyObject *key)
  {
  	register dictobject *mp;
***************
*** 404,409 ****
  
  void
! PyDict_Clear(op)
! 	PyObject *op;
  {
  	int i, n;
--- 384,388 ----
  
  void
! PyDict_Clear(PyObject *op)
  {
  	int i, n;
***************
*** 427,435 ****
  
  int
! PyDict_Next(op, ppos, pkey, pvalue)
! 	PyObject *op;
! 	int *ppos;
! 	PyObject **pkey;
! 	PyObject **pvalue;
  {
  	int i;
--- 406,410 ----
  
  int
! PyDict_Next(PyObject *op, int *ppos, PyObject **pkey, PyObject **pvalue)
  {
  	int i;
***************
*** 456,461 ****
  
  static void
! dict_dealloc(mp)
! 	register dictobject *mp;
  {
  	register int i;
--- 431,435 ----
  
  static void
! dict_dealloc(register dictobject *mp)
  {
  	register int i;
***************
*** 479,486 ****
  
  static int
! dict_print(mp, fp, flags)
! 	register dictobject *mp;
! 	register FILE *fp;
! 	register int flags;
  {
  	register int i;
--- 453,457 ----
  
  static int
! dict_print(register dictobject *mp, register FILE *fp, register int flags)
  {
  	register int i;
***************
*** 519,524 ****
  
  static PyObject *
! dict_repr(mp)
! 	dictobject *mp;
  {
  	auto PyObject *v;
--- 490,494 ----
  
  static PyObject *
! dict_repr(dictobject *mp)
  {
  	auto PyObject *v;
***************
*** 556,561 ****
  
  static int
! dict_length(mp)
! 	dictobject *mp;
  {
  	return mp->ma_used;
--- 526,530 ----
  
  static int
! dict_length(dictobject *mp)
  {
  	return mp->ma_used;
***************
*** 563,569 ****
  
  static PyObject *
! dict_subscript(mp, key)
! 	dictobject *mp;
! 	register PyObject *key;
  {
  	PyObject *v;
--- 532,536 ----
  
  static PyObject *
! dict_subscript(dictobject *mp, register PyObject *key)
  {
  	PyObject *v;
***************
*** 591,597 ****
  
  static int
! dict_ass_sub(mp, v, w)
! 	dictobject *mp;
! 	PyObject *v, *w;
  {
  	if (w == NULL)
--- 558,562 ----
  
  static int
! dict_ass_sub(dictobject *mp, PyObject *v, PyObject *w)
  {
  	if (w == NULL)
***************
*** 608,614 ****
  
  static PyObject *
! dict_keys(mp, args)
! 	register dictobject *mp;
! 	PyObject *args;
  {
  	register PyObject *v;
--- 573,577 ----
  
  static PyObject *
! dict_keys(register dictobject *mp, PyObject *args)
  {
  	register PyObject *v;
***************
*** 631,637 ****
  
  static PyObject *
! dict_values(mp, args)
! 	register dictobject *mp;
! 	PyObject *args;
  {
  	register PyObject *v;
--- 594,598 ----
  
  static PyObject *
! dict_values(register dictobject *mp, PyObject *args)
  {
  	register PyObject *v;
***************
*** 654,660 ****
  
  static PyObject *
! dict_items(mp, args)
! 	register dictobject *mp;
! 	PyObject *args;
  {
  	register PyObject *v;
--- 615,619 ----
  
  static PyObject *
! dict_items(register dictobject *mp, PyObject *args)
  {
  	register PyObject *v;
***************
*** 686,692 ****
  
  static PyObject *
! dict_update(mp, args)
!       register dictobject *mp;
!       PyObject *args;
  {
  	register int i;
--- 645,649 ----
  
  static PyObject *
! dict_update(register dictobject *mp, PyObject *args)
  {
  	register int i;
***************
*** 719,725 ****
  
  static PyObject *
! dict_copy(mp, args)
!       register dictobject *mp;
!       PyObject *args;
  {
  	if (!PyArg_Parse(args, ""))
--- 676,680 ----
  
  static PyObject *
! dict_copy(register dictobject *mp, PyObject *args)
  {
  	if (!PyArg_Parse(args, ""))
***************
*** 729,734 ****
  
  PyObject *
! PyDict_Copy(o)
! 	PyObject *o;
  {
  	register dictobject *mp;
--- 684,688 ----
  
  PyObject *
! PyDict_Copy(PyObject *o)
  {
  	register dictobject *mp;
***************
*** 762,767 ****
  
  int
! PyDict_Size(mp)
! 	PyObject *mp;
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
--- 716,720 ----
  
  int
! PyDict_Size(PyObject *mp)
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
***************
*** 773,778 ****
  
  PyObject *
! PyDict_Keys(mp)
! 	PyObject *mp;
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
--- 726,730 ----
  
  PyObject *
! PyDict_Keys(PyObject *mp)
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
***************
*** 784,789 ****
  
  PyObject *
! PyDict_Values(mp)
! 	PyObject *mp;
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
--- 736,740 ----
  
  PyObject *
! PyDict_Values(PyObject *mp)
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
***************
*** 795,800 ****
  
  PyObject *
! PyDict_Items(mp)
! 	PyObject *mp;
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
--- 746,750 ----
  
  PyObject *
! PyDict_Items(PyObject *mp)
  {
  	if (mp == NULL || !PyDict_Check(mp)) {
***************
*** 814,821 ****
  
  static PyObject *
! characterize(a, b, pval)
! 	dictobject *a;
! 	dictobject *b;
! 	PyObject **pval;
  {
  	PyObject *diff = NULL;
--- 764,768 ----
  
  static PyObject *
! characterize(dictobject *a, dictobject *b, PyObject **pval)
  {
  	PyObject *diff = NULL;
***************
*** 844,849 ****
  
  static int
! dict_compare(a, b)
! 	dictobject *a, *b;
  {
  	PyObject *adiff, *bdiff, *aval, *bval;
--- 791,795 ----
  
  static int
! dict_compare(dictobject *a, dictobject *b)
  {
  	PyObject *adiff, *bdiff, *aval, *bval;
***************
*** 874,879 ****
  
  static int
! dict_compare(a, b)
! 	dictobject *a, *b;
  {
  	PyObject *akeys, *bkeys;
--- 820,824 ----
  
  static int
! dict_compare(dictobject *a, dictobject *b)
  {
  	PyObject *akeys, *bkeys;
***************
*** 953,959 ****
  
  static PyObject *
! dict_has_key(mp, args)
! 	register dictobject *mp;
! 	PyObject *args;
  {
  	PyObject *key;
--- 898,902 ----
  
  static PyObject *
! dict_has_key(register dictobject *mp, PyObject *args)
  {
  	PyObject *key;
***************
*** 976,982 ****
  
  static PyObject *
! dict_get(mp, args)
! 	register dictobject *mp;
! 	PyObject *args;
  {
  	PyObject *key;
--- 919,923 ----
  
  static PyObject *
! dict_get(register dictobject *mp, PyObject *args)
  {
  	PyObject *key;
***************
*** 1010,1016 ****
  
  static PyObject *
! dict_clear(mp, args)
! 	register dictobject *mp;
! 	PyObject *args;
  {
  	if (!PyArg_NoArgs(args))
--- 951,955 ----
  
  static PyObject *
! dict_clear(register dictobject *mp, PyObject *args)
  {
  	if (!PyArg_NoArgs(args))
***************
*** 1059,1065 ****
  
  static PyObject *
! dict_getattr(mp, name)
! 	dictobject *mp;
! 	char *name;
  {
  	return Py_FindMethod(mapp_methods, (PyObject *)mp, name);
--- 998,1002 ----
  
  static PyObject *
! dict_getattr(dictobject *mp, char *name)
  {
  	return Py_FindMethod(mapp_methods, (PyObject *)mp, name);
***************
*** 1096,1102 ****
  
  PyObject *
! PyDict_GetItemString(v, key)
! 	PyObject *v;
! 	char *key;
  {
  	PyObject *kv, *rv;
--- 1033,1037 ----
  
  PyObject *
! PyDict_GetItemString(PyObject *v, char *key)
  {
  	PyObject *kv, *rv;
***************
*** 1110,1117 ****
  
  int
! PyDict_SetItemString(v, key, item)
! 	PyObject *v;
! 	char *key;
! 	PyObject *item;
  {
  	PyObject *kv;
--- 1045,1049 ----
  
  int
! PyDict_SetItemString(PyObject *v, char *key, PyObject *item)
  {
  	PyObject *kv;
***************
*** 1127,1133 ****
  
  int
! PyDict_DelItemString(v, key)
! 	PyObject *v;
! 	char *key;
  {
  	PyObject *kv;
--- 1059,1063 ----
  
  int
! PyDict_DelItemString(PyObject *v, char *key)
  {
  	PyObject *kv;