git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34b8615
)
pidl: give the varible name for bad type in python calls
author
Andrew Tridgell
<tridge@samba.org>
Sun, 22 Aug 2010 04:49:10 +0000
(14:49 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 22 Aug 2010 04:57:34 +0000
(14:57 +1000)
This makes it much clearer which argument to a function had the wrong
type
source4/librpc/rpc/pyrpc.h
patch
|
blob
|
history
diff --git
a/source4/librpc/rpc/pyrpc.h
b/source4/librpc/rpc/pyrpc.h
index f49122a0aef75e5ea2dc58bb699a91ddf53d3e49..4ba9bd3e1fbc1f8a4c36b61c8f876b64d4b925b3 100644
(file)
--- a/
source4/librpc/rpc/pyrpc.h
+++ b/
source4/librpc/rpc/pyrpc.h
@@
-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; \
}