summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
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 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)
{