From d2d2e7ab0228c1a753555f87d1d40743e366a00a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 14 Aug 2011 10:05:42 +1000 Subject: s3-passdb: Fix python < 2.6 build errors in passdb python wrapper Autobuild-User: Andrew Bartlett Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104 --- source3/passdb/py_passdb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') 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)) {\ -- cgit