summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-23 11:25:06 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-23 11:26:31 +0100
commit58cfb1a9e1470b86f664e489e20cde7af294d07b (patch)
tree08c0c88bee63dfdf39b917df9a553cd518ad9c94 /source4/lib/ldb
parent4d02bbbfb4d74367bde0f768c02ddb99910ef62d (diff)
downloadsamba-58cfb1a9e1470b86f664e489e20cde7af294d07b.tar.gz
samba-58cfb1a9e1470b86f664e489e20cde7af294d07b.tar.bz2
samba-58cfb1a9e1470b86f664e489e20cde7af294d07b.zip
python: Define Py_ssize_t if the Python library doesn't.
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/pyldb.c6
1 files changed, 6 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