wplua: allow exchanging arguments and results with scripts
This commit is contained in:
@@ -835,7 +835,7 @@ wp_lua_scripting_api_init (lua_State *L)
|
||||
wplua_register_type_methods (L, WP_TYPE_SESSION_ITEM,
|
||||
session_item_new, session_item_methods);
|
||||
|
||||
wplua_load_uri (L, URI_API, &error);
|
||||
wplua_load_uri (L, URI_API, 0, 0, &error);
|
||||
if (G_UNLIKELY (error))
|
||||
wp_critical ("Failed to load api: %s", error->message);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user