diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-02-20 14:25:56 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-02-20 14:25:56 +0200 |
commit | b305fb6411939bf6afbe2ecf2c1bdf765c9247a9 (patch) | |
tree | 6421d6425b20c0848180b847785f7923be0acae9 /indra/llcommon/lua_function.h | |
parent | 9b1796df73f2d4fa19517f390258f798c10bff1e (diff) |
Initial require implementation
Diffstat (limited to 'indra/llcommon/lua_function.h')
-rw-r--r-- | indra/llcommon/lua_function.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/lua_function.h b/indra/llcommon/lua_function.h index c23bf533ba..f549137c3e 100644 --- a/indra/llcommon/lua_function.h +++ b/indra/llcommon/lua_function.h @@ -22,6 +22,15 @@ #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 |