diff options
author | sapier <Sapier at GMX dot net> | 2013-11-26 18:15:31 +0100 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2013-11-29 22:09:14 +0100 |
commit | 2e66aca35722e7fee786027d545fe371786fc01f (patch) | |
tree | f6d3ec721d23680bb493bd66054379b9327a1c7a /src/script/lua_api/l_internal.h | |
parent | b08d7558de53325d184b3ddf0476cb84fc08d0ad (diff) | |
download | minetest-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_internal.h')
-rw-r--r-- | src/script/lua_api/l_internal.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/lua_api/l_internal.h b/src/script/lua_api/l_internal.h index 14215ee5d..5936ac046 100644 --- a/src/script/lua_api/l_internal.h +++ b/src/script/lua_api/l_internal.h @@ -30,14 +30,16 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_internal.h" #define luamethod(class, name) {#name, class::l_##name} -#define API_FCT(name) registerFunction(L,#name,l_##name,top) +#define API_FCT(name) registerFunction(L, #name, l_##name,top) +#define ASYNC_API_FCT(name) engine.registerFunction(#name, l_##name) #if (defined(WIN32) || defined(_WIN32_WCE)) #define NO_MAP_LOCK_REQUIRED #else #include "main.h" #include "profiler.h" -#define NO_MAP_LOCK_REQUIRED ScopeProfiler nolocktime(g_profiler,"Scriptapi: unlockable time",SPT_ADD) +#define NO_MAP_LOCK_REQUIRED \ + ScopeProfiler nolocktime(g_profiler,"Scriptapi: unlockable time",SPT_ADD) #endif #endif /* L_INTERNAL_H_ */ |