tables and strings respect __len metamethod

This commit is contained in:
Roberto Ierusalimschy
2007-09-10 14:59:32 -03:00
parent 8acaa2ce07
commit fe0838cd1c
3 changed files with 34 additions and 23 deletions

6
ltm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ltm.c,v 2.7 2005/12/22 16:19:56 roberto Exp roberto $
** $Id: ltm.c,v 2.8 2006/01/10 12:50:00 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -30,9 +30,9 @@ const char *const luaT_typenames[] = {
void luaT_init (lua_State *L) {
static const char *const luaT_eventname[] = { /* ORDER TM */
"__index", "__newindex",
"__gc", "__mode", "__eq",
"__gc", "__mode", "__len", "__eq",
"__add", "__sub", "__mul", "__div", "__mod",
"__pow", "__unm", "__len", "__lt", "__le",
"__pow", "__unm", "__lt", "__le",
"__concat", "__call"
};
int i;