summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-07-17 09:22:55 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2000-07-17 09:22:55 (GMT)
commitcf5f3587849e6fbdc68dc91bd3182625f616f2a0 (patch)
treedf751c239b30c82a159d31b30ad7785c765614b2 /Objects
parentaf36a3aa2046dc14af5c3b5e77390ccb5c44f3f1 (diff)
downloadcpython-cf5f3587849e6fbdc68dc91bd3182625f616f2a0.zip
cpython-cf5f3587849e6fbdc68dc91bd3182625f616f2a0.tar.gz
cpython-cf5f3587849e6fbdc68dc91bd3182625f616f2a0.tar.bz2
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')
-rw-r--r--Objects/abstract.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 2c7c307..1d99019 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)
{