wplua: allow exchanging arguments and results with scripts

This commit is contained in:
George Kiagiadakis
2021-02-03 10:28:32 +02:00
parent ef9b6ef982
commit 460ff6591d
7 changed files with 82 additions and 38 deletions

View File

@@ -140,7 +140,7 @@ wp_lua_scripting_load_configuration (const gchar * conf_file,
path = g_build_filename (wp_get_config_dir (), conf_file, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
wp_info ("loading config file: %s", path);
if (!wplua_load_path (L, path, error))
if (!wplua_load_path (L, path, 0, 0, error))
return FALSE;
found = TRUE;
}
@@ -160,7 +160,7 @@ wp_lua_scripting_load_configuration (const gchar * conf_file,
if (g_str_has_suffix (filename, ".lua")) {
g_autofree gchar * file = g_build_filename (path, filename, NULL);
wp_info ("loading config file: %s", file);
if (!wplua_load_path (L, file, error))
if (!wplua_load_path (L, file, 0, 0, error))
return FALSE;
found = TRUE;
}