[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.41,2.42

M.-A. Lemburg python-dev@python.org
Mon, 17 Jul 2000 02:22:58 -0700


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

Modified Files:
	abstract.c 
Log Message:
Restore PyXXX_Length() APIs for binary compatibility.
New code will see the macros and therefore use the PyXXX_Size()
APIs instead.
By Thomas Wouters.

Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.41
retrieving revision 2.42
diff -C2 -r2.41 -r2.42
*** abstract.c	2000/07/12 12:56:19	2.41
--- abstract.c	2000/07/17 09:22:55	2.42
***************
*** 79,82 ****
--- 79,90 ----
  }
  
+ #undef PyObject_Length
+ int
+ PyObject_Length(PyObject *o)
+ {
+ 	return PyObject_Size(o);
+ }
+ #define PyObject_Length PyObject_Size
+ 
  PyObject *
  PyObject_GetItem(PyObject *o, PyObject *key)
***************
*** 821,824 ****
--- 829,840 ----
  }
  
+ #undef PySequence_Length
+ int
+ PySequence_Length(PyObject *s)
+ {
+ 	return PySequence_Size(s);
+ }
+ #define PySequence_Length PySequence_Size
+ 
  PyObject *
  PySequence_Concat(PyObject *s, PyObject *o)
***************
*** 1278,1281 ****
--- 1294,1305 ----
  	return -1;
  }
+ 
+ #undef PyMapping_Length
+ int
+ PyMapping_Length(PyObject *o)
+ {
+ 	return PyMapping_Size(o);
+ }
+ #define PyMapping_Length PyMapping_Size
  
  PyObject *