net: Fix python 2.4 compatibility.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 3 Feb 2010 22:55:58 +0000 (23:55 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 3 Feb 2010 22:55:58 +0000 (23:55 +0100)
source4/utils/net/net.c

index 2d45a4bb54099efeb686d2aab1d73caf5f219258..3709b0acdaf81bc50b8581196e19c25ecaa02df7 100644 (file)
 #include "auth/credentials/credentials.h"
 #include "scripting/python/modules.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;
+#endif
+
 static PyObject *py_tuple_from_argv(int argc, const char *argv[])
 {
        PyObject *l;