diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-27 17:10:21 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-27 17:10:21 -0300 |
| commit | b53dc0c4853c56694dda727793e5f6188de39dd8 (patch) | |
| tree | d574df00c35228687d2accd314c1065cf0f42bff | |
| parent | 63e230a16bd030d11d041dfbec7a8a9bf0152b1e (diff) | |
| download | lua-b53dc0c4853c56694dda727793e5f6188de39dd8.tar.gz lua-b53dc0c4853c56694dda727793e5f6188de39dd8.tar.bz2 lua-b53dc0c4853c56694dda727793e5f6188de39dd8.zip | |
TAG_ARRAY -> TAG_TABLE
| -rw-r--r-- | lapi.c | 12 | ||||
| -rw-r--r-- | lbuiltin.c | 4 | ||||
| -rw-r--r-- | ldebug.c | 4 | ||||
| -rw-r--r-- | lgc.c | 4 | ||||
| -rw-r--r-- | lobject.c | 4 | ||||
| -rw-r--r-- | lobject.h | 6 | ||||
| -rw-r--r-- | lref.c | 4 | ||||
| -rw-r--r-- | ltable.c | 6 | ||||
| -rw-r--r-- | ltm.c | 12 | ||||
| -rw-r--r-- | lvm.c | 12 |
10 files changed, 34 insertions, 34 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.74 2000/03/10 18:37:44 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.75 2000/03/20 19:14:54 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -132,7 +132,7 @@ lua_Object lua_gettable (lua_State *L) { | |||
| 132 | lua_Object lua_rawgettable (lua_State *L) { | 132 | lua_Object lua_rawgettable (lua_State *L) { |
| 133 | lua_Object res; | 133 | lua_Object res; |
| 134 | luaA_checkCargs(L, 2); | 134 | luaA_checkCargs(L, 2); |
| 135 | if (ttype(L->top-2) != TAG_ARRAY) | 135 | if (ttype(L->top-2) != TAG_TABLE) |
| 136 | lua_error(L, "indexed expression not a table in rawgettable"); | 136 | lua_error(L, "indexed expression not a table in rawgettable"); |
| 137 | res = luaA_putluaObject(L, luaH_get(L, avalue(L->top-2), L->top-1)); | 137 | res = luaA_putluaObject(L, luaH_get(L, avalue(L->top-2), L->top-1)); |
| 138 | L->top -= 2; | 138 | L->top -= 2; |
| @@ -159,7 +159,7 @@ lua_Object lua_createtable (lua_State *L) { | |||
| 159 | TObject o; | 159 | TObject o; |
| 160 | luaC_checkGC(L); | 160 | luaC_checkGC(L); |
| 161 | avalue(&o) = luaH_new(L, 0); | 161 | avalue(&o) = luaH_new(L, 0); |
| 162 | ttype(&o) = TAG_ARRAY; | 162 | ttype(&o) = TAG_TABLE; |
| 163 | return luaA_putluaObject(L, &o); | 163 | return luaA_putluaObject(L, &o); |
| 164 | } | 164 | } |
| 165 | 165 | ||
| @@ -201,7 +201,7 @@ int lua_isnil (lua_State *L, lua_Object o) { | |||
| 201 | 201 | ||
| 202 | int lua_istable (lua_State *L, lua_Object o) { | 202 | int lua_istable (lua_State *L, lua_Object o) { |
| 203 | UNUSED(L); | 203 | UNUSED(L); |
| 204 | return (o != LUA_NOOBJECT) && (ttype(o) == TAG_ARRAY); | 204 | return (o != LUA_NOOBJECT) && (ttype(o) == TAG_TABLE); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | int lua_isuserdata (lua_State *L, lua_Object o) { | 207 | int lua_isuserdata (lua_State *L, lua_Object o) { |
| @@ -342,7 +342,7 @@ void lua_settag (lua_State *L, int tag) { | |||
| 342 | luaA_checkCargs(L, 1); | 342 | luaA_checkCargs(L, 1); |
| 343 | luaT_realtag(L, tag); | 343 | luaT_realtag(L, tag); |
| 344 | switch (ttype(L->top-1)) { | 344 | switch (ttype(L->top-1)) { |
| 345 | case TAG_ARRAY: | 345 | case TAG_TABLE: |
| 346 | (L->top-1)->value.a->htag = tag; | 346 | (L->top-1)->value.a->htag = tag; |
| 347 | break; | 347 | break; |
| 348 | case TAG_USERDATA: | 348 | case TAG_USERDATA: |
| @@ -405,7 +405,7 @@ int luaA_next (lua_State *L, const Hash *t, int i) { | |||
| 405 | 405 | ||
| 406 | 406 | ||
| 407 | int lua_next (lua_State *L, lua_Object t, int i) { | 407 | int lua_next (lua_State *L, lua_Object t, int i) { |
| 408 | if (ttype(t) != TAG_ARRAY) | 408 | if (ttype(t) != TAG_TABLE) |
| 409 | lua_error(L, "Lua API error - object is not a table in `lua_next'"); | 409 | lua_error(L, "Lua API error - object is not a table in `lua_next'"); |
| 410 | i = luaA_next(L, avalue(t), i); | 410 | i = luaA_next(L, avalue(t), i); |
| 411 | top2LC(L, (i==0) ? 0 : 2); | 411 | top2LC(L, (i==0) ? 0 : 2); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbuiltin.c,v 1.97 2000/03/24 17:26:08 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.98 2000/03/27 20:08:02 roberto Exp roberto $ |
| 3 | ** Built-in functions | 3 | ** Built-in functions |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -380,7 +380,7 @@ void luaB_tostring (lua_State *L) { | |||
| 380 | case TAG_STRING: | 380 | case TAG_STRING: |
| 381 | lua_pushobject(L, o); | 381 | lua_pushobject(L, o); |
| 382 | return; | 382 | return; |
| 383 | case TAG_ARRAY: | 383 | case TAG_TABLE: |
| 384 | sprintf(buff, "table: %p", o->value.a); | 384 | sprintf(buff, "table: %p", o->value.a); |
| 385 | break; | 385 | break; |
| 386 | case TAG_LCLOSURE: case TAG_CCLOSURE: | 386 | case TAG_LCLOSURE: case TAG_CCLOSURE: |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 1.11 2000/03/10 18:37:44 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.12 2000/03/20 19:14:54 roberto Exp roberto $ |
| 3 | ** Debug Interface | 3 | ** Debug Interface |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | static const lua_Type normtype[] = { /* ORDER LUA_T */ | 25 | static const lua_Type normtype[] = { /* ORDER LUA_T */ |
| 26 | TAG_USERDATA, TAG_NUMBER, TAG_STRING, TAG_ARRAY, | 26 | TAG_USERDATA, TAG_NUMBER, TAG_STRING, TAG_TABLE, |
| 27 | TAG_LPROTO, TAG_CPROTO, TAG_NIL, | 27 | TAG_LPROTO, TAG_CPROTO, TAG_NIL, |
| 28 | TAG_LCLOSURE, TAG_CCLOSURE, | 28 | TAG_LCLOSURE, TAG_CCLOSURE, |
| 29 | TAG_LCLOSURE, TAG_CCLOSURE, /* TAG_LCLMARK, TAG_CCLMARK */ | 29 | TAG_LCLOSURE, TAG_CCLOSURE, /* TAG_LCLMARK, TAG_CCLMARK */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lgc.c,v 1.42 2000/03/10 18:37:44 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.43 2000/03/27 20:08:02 roberto Exp roberto $ |
| 3 | ** Garbage Collector | 3 | ** Garbage Collector |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -99,7 +99,7 @@ static int markobject (lua_State *L, TObject *o) { | |||
| 99 | case TAG_USERDATA: case TAG_STRING: | 99 | case TAG_USERDATA: case TAG_STRING: |
| 100 | strmark(L, tsvalue(o)); | 100 | strmark(L, tsvalue(o)); |
| 101 | break; | 101 | break; |
| 102 | case TAG_ARRAY: | 102 | case TAG_TABLE: |
| 103 | hashmark(L, avalue(o)); | 103 | hashmark(L, avalue(o)); |
| 104 | break; | 104 | break; |
| 105 | case TAG_LCLOSURE: case TAG_LCLMARK: | 105 | case TAG_LCLOSURE: case TAG_LCLMARK: |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 1.32 2000/03/03 14:58:26 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.33 2000/03/10 18:37:44 roberto Exp roberto $ |
| 3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -41,7 +41,7 @@ int luaO_equalval (const TObject *t1, const TObject *t2) { | |||
| 41 | return nvalue(t1) == nvalue(t2); | 41 | return nvalue(t1) == nvalue(t2); |
| 42 | case TAG_STRING: case TAG_USERDATA: | 42 | case TAG_STRING: case TAG_USERDATA: |
| 43 | return svalue(t1) == svalue(t2); | 43 | return svalue(t1) == svalue(t2); |
| 44 | case TAG_ARRAY: | 44 | case TAG_TABLE: |
| 45 | return avalue(t1) == avalue(t2); | 45 | return avalue(t1) == avalue(t2); |
| 46 | case TAG_LPROTO: | 46 | case TAG_LPROTO: |
| 47 | return tfvalue(t1) == tfvalue(t2); | 47 | return tfvalue(t1) == tfvalue(t2); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 1.54 2000/03/24 17:26:08 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.55 2000/03/24 19:49:23 roberto Exp roberto $ |
| 3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -35,7 +35,7 @@ typedef enum { | |||
| 35 | TAG_USERDATA = 0, /* default tag for userdata */ | 35 | TAG_USERDATA = 0, /* default tag for userdata */ |
| 36 | TAG_NUMBER, /* fixed tag for numbers */ | 36 | TAG_NUMBER, /* fixed tag for numbers */ |
| 37 | TAG_STRING, /* fixed tag for strings */ | 37 | TAG_STRING, /* fixed tag for strings */ |
| 38 | TAG_ARRAY, /* default tag for tables (or arrays) */ | 38 | TAG_TABLE, /* default tag for tables */ |
| 39 | TAG_LPROTO, /* fixed tag for Lua functions */ | 39 | TAG_LPROTO, /* fixed tag for Lua functions */ |
| 40 | TAG_CPROTO, /* fixed tag for C functions */ | 40 | TAG_CPROTO, /* fixed tag for C functions */ |
| 41 | TAG_NIL, /* last "pre-defined" tag */ | 41 | TAG_NIL, /* last "pre-defined" tag */ |
| @@ -67,7 +67,7 @@ typedef union { | |||
| 67 | struct TString *ts; /* TAG_STRING, TAG_USERDATA */ | 67 | struct TString *ts; /* TAG_STRING, TAG_USERDATA */ |
| 68 | struct Proto *tf; /* TAG_LPROTO, TAG_LMARK */ | 68 | struct Proto *tf; /* TAG_LPROTO, TAG_LMARK */ |
| 69 | struct Closure *cl; /* TAG_[CL]CLOSURE, TAG_[CL]CLMARK */ | 69 | struct Closure *cl; /* TAG_[CL]CLOSURE, TAG_[CL]CLMARK */ |
| 70 | struct Hash *a; /* TAG_ARRAY */ | 70 | struct Hash *a; /* TAG_TABLE */ |
| 71 | int i; /* TAG_LINE */ | 71 | int i; /* TAG_LINE */ |
| 72 | } Value; | 72 | } Value; |
| 73 | 73 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lref.c,v 1.8 2000/03/03 14:58:26 roberto Exp roberto $ | 2 | ** $Id: lref.c,v 1.9 2000/03/10 18:37:44 roberto Exp roberto $ |
| 3 | ** reference mechanism | 3 | ** reference mechanism |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -84,7 +84,7 @@ static int ismarked (const TObject *o) { | |||
| 84 | switch (o->ttype) { | 84 | switch (o->ttype) { |
| 85 | case TAG_STRING: case TAG_USERDATA: | 85 | case TAG_STRING: case TAG_USERDATA: |
| 86 | return o->value.ts->marked; | 86 | return o->value.ts->marked; |
| 87 | case TAG_ARRAY: | 87 | case TAG_TABLE: |
| 88 | return o->value.a->marked; | 88 | return o->value.a->marked; |
| 89 | case TAG_LCLOSURE: case TAG_CCLOSURE: | 89 | case TAG_LCLOSURE: case TAG_CCLOSURE: |
| 90 | return o->value.cl->marked; | 90 | return o->value.cl->marked; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.c,v 1.35 2000/03/03 14:58:26 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 1.36 2000/03/10 18:37:44 roberto Exp roberto $ |
| 3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | #define TagDefault TAG_ARRAY | 35 | #define TagDefault TAG_TABLE |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | 38 | ||
| @@ -49,7 +49,7 @@ Node *luaH_mainposition (const Hash *t, const TObject *key) { | |||
| 49 | case TAG_STRING: case TAG_USERDATA: | 49 | case TAG_STRING: case TAG_USERDATA: |
| 50 | h = tsvalue(key)->hash; | 50 | h = tsvalue(key)->hash; |
| 51 | break; | 51 | break; |
| 52 | case TAG_ARRAY: | 52 | case TAG_TABLE: |
| 53 | h = IntPoint(L, avalue(key)); | 53 | h = IntPoint(L, avalue(key)); |
| 54 | break; | 54 | break; |
| 55 | case TAG_LPROTO: | 55 | case TAG_LPROTO: |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.c,v 1.35 2000/03/20 19:14:54 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.36 2000/03/27 20:08:02 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 | */ |
| @@ -29,7 +29,7 @@ static int luaI_checkevent (lua_State *L, const char *name, int t) { | |||
| 29 | int e = luaL_findstring(name, luaT_eventname); | 29 | int e = luaL_findstring(name, luaT_eventname); |
| 30 | if (e >= IM_N) | 30 | if (e >= IM_N) |
| 31 | luaL_verror(L, "event `%.50s' is deprecated", name); | 31 | luaL_verror(L, "event `%.50s' is deprecated", name); |
| 32 | if (e == IM_GC && t == TAG_ARRAY) | 32 | if (e == IM_GC && t == TAG_TABLE) |
| 33 | luaL_verror(L, "event `gc' for tables is deprecated"); | 33 | luaL_verror(L, "event `gc' for tables is deprecated"); |
| 34 | if (e < 0) | 34 | if (e < 0) |
| 35 | luaL_verror(L, "`%.50s' is not a valid event name", name); | 35 | luaL_verror(L, "`%.50s' is not a valid event name", name); |
| @@ -46,7 +46,7 @@ static const char luaT_validevents[NUM_TAGS][IM_N] = { | |||
| 46 | {1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, /* TAG_USERDATA */ | 46 | {1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, /* TAG_USERDATA */ |
| 47 | {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, /* TAG_NUMBER */ | 47 | {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, /* TAG_NUMBER */ |
| 48 | {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, /* TAG_STRING */ | 48 | {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, /* TAG_STRING */ |
| 49 | {0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, /* TAG_ARRAY */ | 49 | {0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, /* TAG_TABLE */ |
| 50 | {1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, /* TAG_LPROTO */ | 50 | {1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, /* TAG_LPROTO */ |
| 51 | {1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, /* TAG_CPROTO */ | 51 | {1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, /* TAG_CPROTO */ |
| 52 | {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} /* TAG_NIL */ | 52 | {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} /* TAG_NIL */ |
| @@ -106,7 +106,7 @@ int lua_copytagmethods (lua_State *L, int tagto, int tagfrom) { | |||
| 106 | 106 | ||
| 107 | int luaT_effectivetag (lua_State *L, const TObject *o) { | 107 | int luaT_effectivetag (lua_State *L, const TObject *o) { |
| 108 | static const int realtag[] = { /* ORDER LUA_T */ | 108 | static const int realtag[] = { /* ORDER LUA_T */ |
| 109 | TAG_USERDATA, TAG_NUMBER, TAG_STRING, TAG_ARRAY, | 109 | TAG_USERDATA, TAG_NUMBER, TAG_STRING, TAG_TABLE, |
| 110 | TAG_LPROTO, TAG_CPROTO, TAG_NIL, | 110 | TAG_LPROTO, TAG_CPROTO, TAG_NIL, |
| 111 | TAG_LPROTO, TAG_CPROTO, /* TAG_LCLOSURE, TAG_CCLOSURE */ | 111 | TAG_LPROTO, TAG_CPROTO, /* TAG_LCLOSURE, TAG_CCLOSURE */ |
| 112 | }; | 112 | }; |
| @@ -116,7 +116,7 @@ int luaT_effectivetag (lua_State *L, const TObject *o) { | |||
| 116 | int tag = o->value.ts->u.d.tag; | 116 | int tag = o->value.ts->u.d.tag; |
| 117 | return (tag > L->last_tag) ? TAG_USERDATA : tag; /* deprecated test */ | 117 | return (tag > L->last_tag) ? TAG_USERDATA : tag; /* deprecated test */ |
| 118 | } | 118 | } |
| 119 | case TAG_ARRAY: return o->value.a->htag; | 119 | case TAG_TABLE: return o->value.a->htag; |
| 120 | default: return realtag[t]; | 120 | default: return realtag[t]; |
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| @@ -141,7 +141,7 @@ void luaT_settagmethod (lua_State *L, int t, const char *event, TObject *func) { | |||
| 141 | if (!luaT_validevent(t, e)) | 141 | if (!luaT_validevent(t, e)) |
| 142 | luaL_verror(L, "cannot change `%.20s' tag method for type `%.20s'%.20s", | 142 | luaL_verror(L, "cannot change `%.20s' tag method for type `%.20s'%.20s", |
| 143 | luaT_eventname[e], luaO_typenames[t], | 143 | luaT_eventname[e], luaO_typenames[t], |
| 144 | (t == TAG_ARRAY || t == TAG_USERDATA) ? " with default tag" | 144 | (t == TAG_TABLE || t == TAG_USERDATA) ? " with default tag" |
| 145 | : ""); | 145 | : ""); |
| 146 | temp = *func; | 146 | temp = *func; |
| 147 | *func = *luaT_getim(L, t,e); | 147 | *func = *luaT_getim(L, t,e); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.95 2000/03/10 18:37:44 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.96 2000/03/17 13:09:12 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -93,7 +93,7 @@ void luaV_closure (lua_State *L, int nelems) { | |||
| 93 | void luaV_gettable (lua_State *L, StkId top) { | 93 | void luaV_gettable (lua_State *L, StkId top) { |
| 94 | TObject *table = top-2; | 94 | TObject *table = top-2; |
| 95 | const TObject *im; | 95 | const TObject *im; |
| 96 | if (ttype(table) != TAG_ARRAY) { /* not a table, get gettable TM */ | 96 | if (ttype(table) != TAG_TABLE) { /* not a table, get gettable TM */ |
| 97 | im = luaT_getimbyObj(L, table, IM_GETTABLE); | 97 | im = luaT_getimbyObj(L, table, IM_GETTABLE); |
| 98 | if (ttype(im) == TAG_NIL) { | 98 | if (ttype(im) == TAG_NIL) { |
| 99 | L->top = top; | 99 | L->top = top; |
| @@ -128,7 +128,7 @@ void luaV_gettable (lua_State *L, StkId top) { | |||
| 128 | */ | 128 | */ |
| 129 | void luaV_settable (lua_State *L, StkId t, StkId top) { | 129 | void luaV_settable (lua_State *L, StkId t, StkId top) { |
| 130 | const TObject *im; | 130 | const TObject *im; |
| 131 | if (ttype(t) != TAG_ARRAY) { /* not a table, get `settable' method */ | 131 | if (ttype(t) != TAG_TABLE) { /* not a table, get `settable' method */ |
| 132 | L->top = top; | 132 | L->top = top; |
| 133 | im = luaT_getimbyObj(L, t, IM_SETTABLE); | 133 | im = luaT_getimbyObj(L, t, IM_SETTABLE); |
| 134 | if (ttype(im) == TAG_NIL) | 134 | if (ttype(im) == TAG_NIL) |
| @@ -155,7 +155,7 @@ void luaV_settable (lua_State *L, StkId t, StkId top) { | |||
| 155 | 155 | ||
| 156 | 156 | ||
| 157 | void luaV_rawsettable (lua_State *L, StkId t) { | 157 | void luaV_rawsettable (lua_State *L, StkId t) { |
| 158 | if (ttype(t) != TAG_ARRAY) | 158 | if (ttype(t) != TAG_TABLE) |
| 159 | lua_error(L, "indexed expression not a table"); | 159 | lua_error(L, "indexed expression not a table"); |
| 160 | else { | 160 | else { |
| 161 | luaH_set(L, avalue(t), t+1, L->top-1); | 161 | luaH_set(L, avalue(t), t+1, L->top-1); |
| @@ -291,7 +291,7 @@ void luaV_pack (lua_State *L, StkId firstelem, int nvararg, TObject *tab) { | |||
| 291 | int i; | 291 | int i; |
| 292 | Hash *htab; | 292 | Hash *htab; |
| 293 | htab = avalue(tab) = luaH_new(L, nvararg+1); /* +1 for field `n' */ | 293 | htab = avalue(tab) = luaH_new(L, nvararg+1); /* +1 for field `n' */ |
| 294 | ttype(tab) = TAG_ARRAY; | 294 | ttype(tab) = TAG_TABLE; |
| 295 | for (i=0; i<nvararg; i++) | 295 | for (i=0; i<nvararg; i++) |
| 296 | luaH_setint(L, htab, i+1, firstelem+i); | 296 | luaH_setint(L, htab, i+1, firstelem+i); |
| 297 | luaV_setn(L, htab, nvararg); /* store counter in field `n' */ | 297 | luaV_setn(L, htab, nvararg); /* store counter in field `n' */ |
| @@ -430,7 +430,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const Proto *tf, | |||
| 430 | L->top = top; | 430 | L->top = top; |
| 431 | luaC_checkGC(L); | 431 | luaC_checkGC(L); |
| 432 | avalue(top) = luaH_new(L, GETARG_U(i)); | 432 | avalue(top) = luaH_new(L, GETARG_U(i)); |
| 433 | ttype(top) = TAG_ARRAY; | 433 | ttype(top) = TAG_TABLE; |
| 434 | top++; | 434 | top++; |
| 435 | break; | 435 | break; |
| 436 | 436 | ||
