summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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)) {\