瀏覽代碼

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

Needs -DLUAJIT_ENABLE_LUA52COMPAT.
Mike Pall 13 年之前
父節點
當前提交
16d8c83743
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/lib_debug.c

+ 2 - 0
src/lib_debug.c

@@ -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;
 }