mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
dbus: add support for fixed size array of boolean
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d61068f5d5
commit
56e7262cc5
1 changed files with 12 additions and 0 deletions
12
dbus.c
12
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)
|
||||
|
|
Loading…
Reference in a new issue