diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-07-29 18:12:58 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-07-29 18:12:58 +0100 |
commit | c9ec1fc955887b4c5eccdb62a250cd994b84abdd (patch) | |
tree | fae482b8b3056ad7ef2374247fa419cbea89e6a1 /lib/supple/capi.c | |
parent | 340c969dabb6d666d5d052ace26c9b656b7a9126 (diff) | |
download | supple-c9ec1fc955887b4c5eccdb62a250cd994b84abdd.tar.gz |
SUPPLE: Everything to get basic sandboxing working
Diffstat (limited to 'lib/supple/capi.c')
-rw-r--r-- | lib/supple/capi.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 } }; |