diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-08-14 10:05:42 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-14 03:59:48 +0200 |
commit | d2d2e7ab0228c1a753555f87d1d40743e366a00a (patch) | |
tree | f26fc7cb076cefbdba1161acfd42e966fb02f504 /source3/passdb | |
parent | c84caabf8c5061af75d9e046813c1e2e8eff3722 (diff) | |
download | samba-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')
-rw-r--r-- | source3/passdb/py_passdb.c | 4 |
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)) {\ |