summaryrefslogtreecommitdiffstats
path: root/source4/param/pyparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/param/pyparam.c')
-rw-r--r--source4/param/pyparam.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index acadcc08b07..69c2613a099 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -25,6 +25,12 @@
#include "param/loadparm.h"
#include "pytalloc.h"
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+#endif
+
#define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_ptr(obj)
PyAPI_DATA(PyTypeObject) PyLoadparmContext;