summaryrefslogtreecommitdiff
path: root/lib/supple/capi.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-29 18:12:58 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-29 18:12:58 +0100
commitc9ec1fc955887b4c5eccdb62a250cd994b84abdd (patch)
treefae482b8b3056ad7ef2374247fa419cbea89e6a1 /lib/supple/capi.c
parent340c969dabb6d666d5d052ace26c9b656b7a9126 (diff)
downloadsupple-c9ec1fc955887b4c5eccdb62a250cd994b84abdd.tar.gz
SUPPLE: Everything to get basic sandboxing working
Diffstat (limited to 'lib/supple/capi.c')
-rw-r--r--lib/supple/capi.c10
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 }
};