stricter control (using tag variants) over closure kinds (Lua x C)

This commit is contained in:
Roberto Ierusalimschy
2011-06-02 16:31:40 -03:00
parent 0214dab989
commit 3b44821334
10 changed files with 176 additions and 153 deletions

4
ltm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ltm.c,v 2.12 2010/04/13 20:48:12 roberto Exp roberto $
** $Id: ltm.c,v 2.13 2011/02/28 17:32:10 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -62,7 +62,7 @@ const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
Table *mt;
switch (ttype(o)) {
switch (ttypenv(o)) {
case LUA_TTABLE:
mt = hvalue(o)->metatable;
break;