diff options
Diffstat (limited to 'fallback.c')
-rw-r--r-- | fallback.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_fallback="$Id: fallback.c,v 1.25 1996/04/25 14:10:00 roberto Exp roberto $"; | 6 | char *rcs_fallback="$Id: fallback.c,v 1.26 1997/02/26 17:38:41 roberto Unstable roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -132,7 +132,7 @@ int luaI_ref (Object *object, int lock) | |||
132 | { | 132 | { |
133 | int i; | 133 | int i; |
134 | int oldSize; | 134 | int oldSize; |
135 | if (tag(object) == LUA_T_NIL) | 135 | if (ttype(object) == LUA_T_NIL) |
136 | return -1; /* special ref for nil */ | 136 | return -1; /* special ref for nil */ |
137 | for (i=0; i<refSize; i++) | 137 | for (i=0; i<refSize; i++) |
138 | if (refArray[i].status == FREE) | 138 | if (refArray[i].status == FREE) |
@@ -223,7 +223,7 @@ int lua_newtag (char *t) | |||
223 | else | 223 | else |
224 | lua_error("invalid type for new tag"); | 224 | lua_error("invalid type for new tag"); |
225 | for (i=0; i<FB_N; i++) | 225 | for (i=0; i<FB_N; i++) |
226 | luaI_IMtable[last_tag-BASE_TAG].int_method[i].tag = LUA_T_NIL; | 226 | luaI_IMtable[last_tag-BASE_TAG].int_method[i].ttype = LUA_T_NIL; |
227 | return last_tag; | 227 | return last_tag; |
228 | } | 228 | } |
229 | 229 | ||
@@ -241,9 +241,9 @@ static void checktag (int tag) | |||
241 | void luaI_settag (int tag, Object *o) | 241 | void luaI_settag (int tag, Object *o) |
242 | { | 242 | { |
243 | checktag(tag); | 243 | checktag(tag); |
244 | if (tag(o) != luaI_IMtable[tag-BASE_TAG].tp) | 244 | if (ttype(o) != luaI_IMtable[tag-BASE_TAG].tp) |
245 | lua_error("Tag is not compatible with this type"); | 245 | lua_error("Tag is not compatible with this type"); |
246 | if (o->tag == LUA_T_ARRAY) | 246 | if (o->ttype == LUA_T_ARRAY) |
247 | o->value.a->htag = tag; | 247 | o->value.a->htag = tag; |
248 | else /* must be userdata */ | 248 | else /* must be userdata */ |
249 | o->value.ts->tag = tag; | 249 | o->value.ts->tag = tag; |
@@ -251,7 +251,7 @@ void luaI_settag (int tag, Object *o) | |||
251 | 251 | ||
252 | int luaI_tag (Object *o) | 252 | int luaI_tag (Object *o) |
253 | { | 253 | { |
254 | lua_Type t = tag(o); | 254 | lua_Type t = ttype(o); |
255 | if (t == LUA_T_USERDATA) | 255 | if (t == LUA_T_USERDATA) |
256 | return o->value.ts->tag; | 256 | return o->value.ts->tag; |
257 | else if (t == LUA_T_ARRAY) | 257 | else if (t == LUA_T_ARRAY) |
@@ -265,7 +265,7 @@ Object *luaI_getim (int tag, int event) | |||
265 | return &luaI_fallBacks[event].function; | 265 | return &luaI_fallBacks[event].function; |
266 | else if (validtag(tag)) { | 266 | else if (validtag(tag)) { |
267 | Object *func = &luaI_IMtable[tag-BASE_TAG].int_method[event]; | 267 | Object *func = &luaI_IMtable[tag-BASE_TAG].int_method[event]; |
268 | if (func->tag == LUA_T_NIL) | 268 | if (func->ttype == LUA_T_NIL) |
269 | return NULL; | 269 | return NULL; |
270 | else | 270 | else |
271 | return func; | 271 | return func; |