From 4feebfc3a3fdf927917c6285409997e266ffa606 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 8 Dec 2023 12:28:24 +0200 Subject: [PATCH] m-lua-scripting: add Core.get_properties() method --- modules/module-lua-scripting/api/api.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/module-lua-scripting/api/api.c b/modules/module-lua-scripting/api/api.c index a8257b89..1a55e595 100644 --- a/modules/module-lua-scripting/api/api.c +++ b/modules/module-lua-scripting/api/api.c @@ -142,6 +142,15 @@ static const luaL_Reg i18n_funcs[] = { /* WpCore */ +static int +core_get_properties (lua_State *L) +{ + WpCore * core = get_wp_core (L); + g_autoptr (WpProperties) p = wp_core_get_properties (core); + wplua_properties_to_table (L, p); + return 1; +} + static int core_get_info (lua_State *L) { @@ -276,6 +285,7 @@ core_test_feature (lua_State *L) } static const luaL_Reg core_funcs[] = { + { "get_properties", core_get_properties }, { "get_info", core_get_info }, { "get_vm_type", core_get_vm_type }, { "idle_add", core_idle_add },