aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lvm.c b/lvm.c
index 42baff32..9baee90e 100644
--- a/lvm.c
+++ b/lvm.c
@@ -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) {
93void luaV_gettable (lua_State *L, StkId top) { 93void 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*/
129void luaV_settable (lua_State *L, StkId t, StkId top) { 129void 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
157void luaV_rawsettable (lua_State *L, StkId t) { 157void 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