diff options
Diffstat (limited to 'src/script/lua_api/l_internal.h')
-rw-r--r-- | src/script/lua_api/l_internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/lua_api/l_internal.h b/src/script/lua_api/l_internal.h index 1e40c5c4a..456c8fcce 100644 --- a/src/script/lua_api/l_internal.h +++ b/src/script/lua_api/l_internal.h @@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #define API_FCT(name) registerFunction(L, #name, l_##name,top) #define ASYNC_API_FCT(name) engine.registerFunction(#name, l_##name) +#define MAP_LOCK_REQUIRED #define NO_MAP_LOCK_REQUIRED /* @@ -45,4 +46,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #endif */ +#define GET_ENV_PTR_NO_MAP_LOCK \ + ServerEnvironment *env = (ServerEnvironment *)getEnv(L); \ + if (env == NULL) \ + return 0 + +#define GET_ENV_PTR \ + MAP_LOCK_REQUIRED; \ + GET_ENV_PTR_NO_MAP_LOCK + #endif /* L_INTERNAL_H_ */ |