diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-02-23 16:57:00 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-02-23 16:57:00 +0200 |
commit | 49785357e07f6309e2504b56829d9916f75168b2 (patch) | |
tree | 3c1c1f6f2ae167f806b47bf062e54bdb9838f1d7 /indra/llcommon/lua_function.h | |
parent | 32bf9c7b7a9d2b2428b052d74389ec48ccc427cf (diff) |
require() code clean-up
Diffstat (limited to 'indra/llcommon/lua_function.h')
-rw-r--r-- | indra/llcommon/lua_function.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/indra/llcommon/lua_function.h b/indra/llcommon/lua_function.h index 54db92f73e..0605eb12a6 100644 --- a/indra/llcommon/lua_function.h +++ b/indra/llcommon/lua_function.h @@ -22,15 +22,6 @@ #define lua_register(L, n, f) (lua_pushcfunction(L, (f), n), lua_setglobal(L, (n))) #define lua_rawlen lua_objlen -namespace -{ - // can't specify free function free() as a unique_ptr deleter - struct freer - { - void operator()(void *ptr) { free(ptr); } - }; -} - namespace lluau { // luau defines luaL_error() as void, but we want to use the Lua idiom of @@ -56,6 +47,7 @@ namespace lluau // rather than string_views because dostring() needs pointers to nul- // terminated char arrays. int dostring(lua_State* L, const std::string& desc, const std::string& text); + int loadstring(lua_State* L, const std::string& desc, const std::string& text); } // namespace lluau std::string lua_tostdstring(lua_State* L, int index); |