diff --git a/src/lbaselib.cpp b/src/lbaselib.cpp index ec670f30de..e7355a1379 100644 --- a/src/lbaselib.cpp +++ b/src/lbaselib.cpp @@ -778,12 +778,6 @@ LUAMOD_API int luaopen_base (lua_State *L) { lua_pushboolean(L, false); #endif lua_setfield(L, -2, "_PSOUP"); -#ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE - G(L)->ready_for_table_mt = false; -#endif -#ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE - G(L)->ready_for_table_mt = true; -#endif return 1; } diff --git a/src/lstate.cpp b/src/lstate.cpp index ebff3f8214..01b97c9dec 100644 --- a/src/lstate.cpp +++ b/src/lstate.cpp @@ -239,7 +239,6 @@ static void f_luaopen (lua_State *L, void *ud) { g->gcstp = 0; /* allow gc */ setnilvalue(&g->nilvalue); /* now state is complete */ #ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE - g->ready_for_table_mt = true; setnilvalue(&g->table_mt); #endif luai_userstateopen(L); diff --git a/src/lstate.h b/src/lstate.h index 20921d3fed..3e589f6fe3 100644 --- a/src/lstate.h +++ b/src/lstate.h @@ -312,7 +312,6 @@ typedef struct global_State { std::time_t deadline; #endif #ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE - bool ready_for_table_mt; TValue table_mt; #endif } global_State; diff --git a/src/ltable.cpp b/src/ltable.cpp index 33bb64b2c9..063004bf0a 100644 --- a/src/ltable.cpp +++ b/src/ltable.cpp @@ -643,8 +643,6 @@ Table *luaH_new (lua_State *L) { #ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE void luaH_initmetatable (lua_State *L, Table *t) { - if (!G(L)->ready_for_table_mt) - return; L->ci->top.p++; lua_pushnil(L); /* space on the stack where the metatable will go */ if (ttisnil(&G(L)->table_mt)) {