1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

SAPI: Mark all Lua API functions requiring envlock

This commit is contained in:
kwolekr 2015-10-25 00:45:18 -04:00
parent 3936a5e3f7
commit 54f1267c2c
13 changed files with 141 additions and 37 deletions

View file

@ -260,6 +260,8 @@ int ModApiUtil::l_is_yes(lua_State *L)
int ModApiUtil::l_get_builtin_path(lua_State *L)
{
NO_MAP_LOCK_REQUIRED;
std::string path = porting::path_share + DIR_DELIM + "builtin";
lua_pushstring(L, path.c_str());
return 1;
@ -268,6 +270,8 @@ int ModApiUtil::l_get_builtin_path(lua_State *L)
// compress(data, method, level)
int ModApiUtil::l_compress(lua_State *L)
{
NO_MAP_LOCK_REQUIRED;
size_t size;
const char *data = luaL_checklstring(L, 1, &size);
@ -287,6 +291,8 @@ int ModApiUtil::l_compress(lua_State *L)
// decompress(data, method)
int ModApiUtil::l_decompress(lua_State *L)
{
NO_MAP_LOCK_REQUIRED;
size_t size;
const char *data = luaL_checklstring(L, 1, &size);