From c9ec1fc955887b4c5eccdb62a250cd994b84abdd Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 29 Jul 2012 18:12:58 +0100 Subject: SUPPLE: Everything to get basic sandboxing working --- lib/supple/capi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/supple/capi.c') diff --git a/lib/supple/capi.c b/lib/supple/capi.c index c0f8f48..0eaa372 100644 --- a/lib/supple/capi.c +++ b/lib/supple/capi.c @@ -244,6 +244,15 @@ supple_capi_lockdown(lua_State *L) return 2; } +static int +supple_capi_raw_getmm(lua_State *L) +{ + lua_getmetatable(L, 1); + lua_pushvalue(L, 2); + lua_gettable(L, -2); + return 1; +} + static const struct luaL_Reg supple_capi_functions[] = { { "explain", supple_capi_explain }, @@ -251,6 +260,7 @@ supple_capi_functions[] = { { "type", supple_capi_type }, { "rawtype", supple_capi_rawtype }, { "lockdown", supple_capi_lockdown }, + { "raw_getmm", supple_capi_raw_getmm }, { NULL, NULL } }; -- cgit v1.2.1