From 56e7262cc5d37090ea4058a6900e3db11d97e3d7 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 11 Mar 2009 16:22:21 +0100 Subject: [PATCH] dbus: add support for fixed size array of boolean Signed-off-by: Julien Danjou --- dbus.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dbus.c b/dbus.c index 9100e9e6..089de74f 100644 --- a/dbus.c +++ b/dbus.c @@ -128,6 +128,18 @@ a_dbus_message_iter(DBusMessageIter *iter) lua_pushlstring(globalconf.L, c, datalen); } break; + case DBUS_TYPE_BOOLEAN: + { + const bool *b; + lua_newtable(globalconf.L); + dbus_message_iter_get_fixed_array(&sub, &b, &datalen); + for(int i = 0; i < datalen; i++) + { + lua_pushboolean(globalconf.L, b[i]); + lua_rawseti(globalconf.L, -2, i + 1); + } + } + break; } } else if(array_type == DBUS_TYPE_DICT_ENTRY)