diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/pyldb.c | 6 | ||||
-rw-r--r-- | source4/param/pyparam.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index a60307c9eb..f4f43a3d0b 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -28,6 +28,12 @@ #include "ldb_includes.h" #include "pyldb.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 + /* Picked out of thin air. To do this properly, we should probably have some part of the * errors in LDB be allocated to bindings ? */ #define LDB_ERR_PYTHON_EXCEPTION 142 diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index acadcc08b0..69c2613a09 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; |