first implementation of light C functions

This commit is contained in:
Roberto Ierusalimschy
2010-04-14 12:13:48 -03:00
parent fc6203ee43
commit 7dfa4cd655
11 changed files with 141 additions and 88 deletions

4
ltm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ltm.c,v 2.10 2009/11/19 19:06:52 roberto Exp roberto $
** $Id: ltm.c,v 2.11 2010/01/13 16:18:25 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -70,7 +70,7 @@ const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
mt = uvalue(o)->metatable;
break;
default:
mt = G(L)->mt[ttype(o)];
mt = G(L)->mt[ttypenv(o)];
}
return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);
}