summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_util.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-11-26 18:15:31 +0100
committersapier <Sapier at GMX dot net>2013-11-29 22:09:14 +0100
commit2e66aca35722e7fee786027d545fe371786fc01f (patch)
treef6d3ec721d23680bb493bd66054379b9327a1c7a /src/script/lua_api/l_util.cpp
parentb08d7558de53325d184b3ddf0476cb84fc08d0ad (diff)
downloadminetest-2e66aca35722e7fee786027d545fe371786fc01f.tar.gz
minetest-2e66aca35722e7fee786027d545fe371786fc01f.tar.bz2
minetest-2e66aca35722e7fee786027d545fe371786fc01f.zip
Fix modstore/favourites hang by adding asynchronous lua job support
Diffstat (limited to 'src/script/lua_api/l_util.cpp')
-rw-r--r--src/script/lua_api/l_util.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp
index af9c19210..fe10e4f57 100644
--- a/src/script/lua_api/l_util.cpp
+++ b/src/script/lua_api/l_util.cpp
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_internal.h"
#include "common/c_converter.h"
#include "common/c_content.h"
+#include "lua_api/l_async_events.h"
#include "debug.h"
#include "log.h"
#include "tool.h"
@@ -257,3 +258,18 @@ void ModApiUtil::Initialize(lua_State *L, int top)
API_FCT(is_yes);
}
+void ModApiUtil::InitializeAsync(AsyncEngine& engine)
+{
+ ASYNC_API_FCT(debug);
+ ASYNC_API_FCT(log);
+
+ //ASYNC_API_FCT(setting_set);
+ ASYNC_API_FCT(setting_get);
+ //ASYNC_API_FCT(setting_setbool);
+ ASYNC_API_FCT(setting_getbool);
+ //ASYNC_API_FCT(setting_save);
+
+ ASYNC_API_FCT(parse_json);
+
+ ASYNC_API_FCT(is_yes);
+}