summaryrefslogtreecommitdiff
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-07-17 09:22:55 +0000
committerMarc-André Lemburg <mal@egenix.com>2000-07-17 09:22:55 +0000
commit3755fe4e63c1835a7a3f35353b8496c03abf32d7 (patch)
tree3900b971608a272197f908995598bb97ede59ddd /Objects/abstract.c
parent996672d9eb433e8134ac34b393770488f772707a (diff)
downloadcpython-3755fe4e63c1835a7a3f35353b8496c03abf32d7.tar.gz
Restore PyXXX_Length() APIs for binary compatibility.
New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 2c7c307626..1d990194d5 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -78,6 +78,14 @@ PyObject_Size(PyObject *o)
return PyMapping_Size(o);
}
+#undef PyObject_Length
+int
+PyObject_Length(PyObject *o)
+{
+ return PyObject_Size(o);
+}
+#define PyObject_Length PyObject_Size
+
PyObject *
PyObject_GetItem(PyObject *o, PyObject *key)
{
@@ -820,6 +828,14 @@ PySequence_Size(PyObject *s)
return -1;
}
+#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,6 +1294,14 @@ PyMapping_Size(PyObject *o)
return -1;
}
+#undef PyMapping_Length
+int
+PyMapping_Length(PyObject *o)
+{
+ return PyMapping_Size(o);
+}
+#define PyMapping_Length PyMapping_Size
+
PyObject *
PyMapping_GetItemString(PyObject *o, char *key)
{