summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-22 01:51:38 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-22 01:51:38 +0100
commit2c58c9497cb6a15d03626864585f0437949ee6f6 (patch)
tree85a267c746e06f3cde94dc91c12aa53e7ab08b4a /source4/librpc
parent9a7c64f1dce7560c94df99c45eb5c75903cf0e6b (diff)
downloadsamba-2c58c9497cb6a15d03626864585f0437949ee6f6.tar.gz
samba-2c58c9497cb6a15d03626864585f0437949ee6f6.tar.bz2
samba-2c58c9497cb6a15d03626864585f0437949ee6f6.zip
Import types from other Python mechanisms using the Python import mechanism, to ensure they are initialized.
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/pyrpc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h
index af9ca728d8..3b2162ce1b 100644
--- a/source4/librpc/rpc/pyrpc.h
+++ b/source4/librpc/rpc/pyrpc.h
@@ -24,8 +24,8 @@
#include "librpc/rpc/dcerpc.h"
#define PY_CHECK_TYPE(type, var, fail) \
- if (!type ## _Check(var)) {\
- PyErr_Format(PyExc_TypeError, "Expected type %s", type ## _Type.tp_name); \
+ if (!PyObject_TypeCheck(var, type)) {\
+ PyErr_Format(PyExc_TypeError, "Expected type %s", (type)->tp_name); \
fail; \
}