From 58cfb1a9e1470b86f664e489e20cde7af294d07b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 23 Dec 2008 11:25:06 +0100 Subject: python: Define Py_ssize_t if the Python library doesn't. --- source4/lib/ldb/pyldb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib') 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 -- cgit