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:
parent
34b8615574
commit
24159a59a3
@ -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; \
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user