summaryrefslogtreecommitdiff
path: root/source3/passdb/py_passdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-14 10:05:42 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-14 03:59:48 +0200
commitd2d2e7ab0228c1a753555f87d1d40743e366a00a (patch)
treef26fc7cb076cefbdba1161acfd42e966fb02f504 /source3/passdb/py_passdb.c
parentc84caabf8c5061af75d9e046813c1e2e8eff3722 (diff)
downloadsamba-d2d2e7ab0228c1a753555f87d1d40743e366a00a.tar.gz
samba-d2d2e7ab0228c1a753555f87d1d40743e366a00a.tar.bz2
samba-d2d2e7ab0228c1a753555f87d1d40743e366a00a.zip
s3-passdb: Fix python < 2.6 build errors in passdb python wrapper
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/passdb/py_passdb.c')
-rw-r--r--source3/passdb/py_passdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 17d4415f8a..30c3f8ccc9 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -29,6 +29,10 @@
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
+#ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */
+#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+#endif
+
#ifndef PY_CHECK_TYPE
#define PY_CHECK_TYPE(type, var, fail) \
if (!PyObject_TypeCheck(var, type)) {\