diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lj_api.c b/src/lj_api.c index c784ed3f..fe8880eb 100644 --- a/src/lj_api.c +++ b/src/lj_api.c | |||
@@ -1000,6 +1000,12 @@ LUA_API int lua_setmetatable(lua_State *L, int idx) | |||
1000 | return 1; | 1000 | return 1; |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | LUALIB_API void luaL_setmetatable(lua_State *L, const char *tname) | ||
1004 | { | ||
1005 | lua_getfield(L, LUA_REGISTRYINDEX, tname); | ||
1006 | lua_setmetatable(L, -2); | ||
1007 | } | ||
1008 | |||
1003 | LUA_API int lua_setfenv(lua_State *L, int idx) | 1009 | LUA_API int lua_setfenv(lua_State *L, int idx) |
1004 | { | 1010 | { |
1005 | cTValue *o = index2adr(L, idx); | 1011 | cTValue *o = index2adr(L, idx); |