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 /lapi.c | |
parent | 63e230a16bd030d11d041dfbec7a8a9bf0152b1e (diff) | |
download | lua-b53dc0c4853c56694dda727793e5f6188de39dd8.tar.gz lua-b53dc0c4853c56694dda727793e5f6188de39dd8.tar.bz2 lua-b53dc0c4853c56694dda727793e5f6188de39dd8.zip |
TAG_ARRAY -> TAG_TABLE
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 12 |
1 files changed, 6 insertions, 6 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); |