summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-06 17:54:36 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-08 10:39:05 +0000
commit9f2d21561b85edde541d7dbc69ee1fe58c029f81 (patch)
tree6154fa8a4832090dfffcbd304280aaccf755d787 /source4
parent4b97e7c8f20b125015417bcf440128f843ac648f (diff)
downloadsamba-9f2d21561b85edde541d7dbc69ee1fe58c029f81.tar.gz
samba-9f2d21561b85edde541d7dbc69ee1fe58c029f81.tar.bz2
samba-9f2d21561b85edde541d7dbc69ee1fe58c029f81.zip
s4:pydsdb.c - introduce Python 2.4 compatibility defines
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/pydsdb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index db2185f5b1..a512dc0eff 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -28,6 +28,17 @@
#include "auth/kerberos/kerberos.h"
#include "librpc/rpc/pyrpc_util.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;
+typedef intargfunc ssizeargfunc;
+#endif
+
+#ifndef Py_RETURN_NONE
+#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+#endif
+
/* FIXME: These should be in a header file somewhere, once we finish moving
* away from SWIG .. */
#define PyErr_LDB_OR_RAISE(py_ldb, ldb) \