don't point the metatable at the methods table; comment

This commit is contained in:
Glenn Maynard
2005-06-23 08:42:48 +00:00
parent 2a6dcba6e8
commit 7e20ccc36c
+4 -2
View File
@@ -34,9 +34,11 @@ public:
luaL_newmetatable( L, m_sClassName );
int metatable = lua_gettop( L );
// We use the metatable to determine the type of the table, so don't
// allow it to be changed.
lua_pushliteral( L, "__metatable" );
lua_pushvalue( L, methods );
lua_settable( L, metatable ); // hide metatable from Lua getmetatable()
lua_pushstring( L, "(hidden)" );
lua_settable( L, metatable );
lua_pushliteral( L, "__index" );
lua_pushvalue( L, methods );