diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-20 12:16:09 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-20 15:27:45 -0700 |
commit | 8efd1074c21fde70a31756dd54b3b31811beccc8 (patch) | |
tree | 9f30dbc5b88b13baf31d813cf9ccebf1996aff6d /source4/librpc | |
parent | 3fe8e97a7289c18903a9f481a13f8793f9f17bab (diff) | |
download | samba-8efd1074c21fde70a31756dd54b3b31811beccc8.tar.gz samba-8efd1074c21fde70a31756dd54b3b31811beccc8.tar.bz2 samba-8efd1074c21fde70a31756dd54b3b31811beccc8.zip |
s4-pyrpc: fixed build on python 2.4
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/pyrpc.h | 4 | ||||
-rw-r--r-- | source4/librpc/rpc/pyrpc_util.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h index c3bc83877c..52f4f4d3d3 100644 --- a/source4/librpc/rpc/pyrpc.h +++ b/source4/librpc/rpc/pyrpc.h @@ -22,6 +22,10 @@ #include "libcli/util/pyerrors.h" +#ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */ +#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) +#endif + #define PY_CHECK_TYPE(type, var, fail) \ if (!PyObject_TypeCheck(var, type)) {\ PyErr_Format(PyExc_TypeError, __location__ ": Expected type '%s' for '%s' of type '%s'", (type)->tp_name, #var, Py_TYPE(var)->tp_name); \ diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c index ba42c08154..33bce387af 100644 --- a/source4/librpc/rpc/pyrpc_util.c +++ b/source4/librpc/rpc/pyrpc_util.c @@ -31,10 +31,6 @@ #include "lib/messaging/messaging.h" #include "lib/messaging/irpc.h" -#ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */ -#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) -#endif - bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *typename) { PyObject *mod; |