aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ltm.c b/ltm.c
index ff01f27a..6cda2973 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 1.10 1997/12/11 14:48:46 roberto Exp roberto $ 2** $Id: ltm.c,v 1.11 1997/12/11 17:21:11 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -112,16 +112,17 @@ int luaT_efectivetag (TObject *o)
112{ 112{
113 int t; 113 int t;
114 switch (t = ttype(o)) { 114 switch (t = ttype(o)) {
115 case LUA_T_ARRAY:
116 return o->value.a->htag;
115 case LUA_T_USERDATA: { 117 case LUA_T_USERDATA: {
116 int tag = o->value.ts->u.d.tag; 118 int tag = o->value.ts->u.d.tag;
117 return (tag >= 0) ? LUA_T_USERDATA : tag; 119 return (tag >= 0) ? LUA_T_USERDATA : tag;
118 } 120 }
119 case LUA_T_ARRAY: 121 case LUA_T_CLOSURE:
120 return o->value.a->htag;
121 case LUA_T_FUNCTION: case LUA_T_MARK:
122 return o->value.cl->consts[0].ttype; 122 return o->value.cl->consts[0].ttype;
123#ifdef DEBUG 123#ifdef DEBUG
124 case LUA_T_LINE: case LUA_T_PROTO: case LUA_T_CPROTO: 124 case LUA_T_PMARK: case LUA_T_CMARK:
125 case LUA_T_CLMARK: case LUA_T_LINE:
125 lua_error("internal error"); 126 lua_error("internal error");
126#endif 127#endif
127 default: 128 default: