From Lua 5.2: debug.setmetatable() returns object.

Needs -DLUAJIT_ENABLE_LUA52COMPAT.
This commit is contained in:
Mike Pall 2012-09-19 16:33:50 +02:00
parent 1afcea1435
commit 16d8c83743

View File

@ -41,7 +41,9 @@ LJLIB_CF(debug_setmetatable)
lj_lib_checktabornil(L, 2);
L->top = L->base+2;
lua_setmetatable(L, 1);
#if !LJ_52
setboolV(L->top-1, 1);
#endif
return 1;
}