wplua: improve gvariant <-> lua conversion functions

* Add more generic lua -> gvariant conversion
* Cleanup the gvariant -> lua function and rename it
This commit is contained in:
George Kiagiadakis
2021-02-13 12:42:36 +02:00
parent 413ff73bab
commit dacf19d9c7
5 changed files with 106 additions and 139 deletions

View File

@@ -109,7 +109,7 @@ load_components (lua_State *L, WpCore * core, GError ** error)
/* optional component arguments */
GVariant *args = NULL;
if (lua_getfield (L, table, "args") == LUA_TTABLE) {
args = wplua_table_to_asv (L, -1);
args = wplua_lua_to_gvariant (L, -1);
}
wp_debug ("load component: %s (%s)", component, type);