diff options
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 |