dbus: add support for fixed size array of boolean

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-03-11 16:22:21 +01:00
parent d61068f5d5
commit 56e7262cc5

12
dbus.c
View file

@ -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)