diff options
| author | Simon McVittie <smcv@debian.org> | 2010-12-02 15:09:00 +0000 |
|---|---|---|
| committer | Simon McVittie <smcv@debian.org> | 2010-12-02 15:09:00 +0000 |
| commit | 156463909029aa5f3b56755f488e3ac15ed5a79a (patch) | |
| tree | ef851f67e698723f7654e5e0ce14bc3ba888e3ac /_dbus_bindings | |
| parent | abefbed911ecab8fb5c08d887479f21b449b392b (diff) | |
| download | dbus-python-156463909029aa5f3b56755f488e3ac15ed5a79a.tar.gz | |
_message_iter_append_multi: assert that mode is what we expect
Diffstat (limited to '_dbus_bindings')
| -rw-r--r-- | _dbus_bindings/message-append.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/_dbus_bindings/message-append.c b/_dbus_bindings/message-append.c index 9ebf0c7..c1cceb3 100644 --- a/_dbus_bindings/message-append.c +++ b/_dbus_bindings/message-append.c @@ -24,6 +24,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include <assert.h> + #define DBG_IS_TOO_VERBOSE #include "types-internal.h" #include "message-internal.h" @@ -588,6 +590,9 @@ _message_iter_append_multi(DBusMessageIter *appender, int inner_type; dbus_bool_t more; + assert(mode == DBUS_TYPE_DICT_ENTRY || mode == DBUS_TYPE_ARRAY || + mode == DBUS_TYPE_STRUCT); + #ifdef USING_DBG fprintf(stderr, "Appending multiple: "); PyObject_Print(obj, stderr, 0); |
