1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

pidl: give the varible name for bad type in python calls

This makes it much clearer which argument to a function had the wrong
type
This commit is contained in:
Andrew Tridgell 2010-08-22 14:49:10 +10:00
parent 34b8615574
commit 24159a59a3

View File

@ -24,7 +24,7 @@
#define PY_CHECK_TYPE(type, var, fail) \
if (!PyObject_TypeCheck(var, type)) {\
PyErr_Format(PyExc_TypeError, "Expected type %s", (type)->tp_name); \
PyErr_Format(PyExc_TypeError, "Expected type %s for %s", (type)->tp_name, #var); \
fail; \
}