aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-10 15:37:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-10 15:37:44 -0300
commit73aa465a8ed8dee6c6a27a6f8b2f51227b70789d (patch)
tree496a63ffffe0312f1d0b9882d97944fa38ed7801 /ldo.c
parent3d0577f4b98908be3f2d697ab75c5fbbd3f6999b (diff)
downloadlua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.gz
lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.bz2
lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.zip
some name changes
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/ldo.c b/ldo.c
index be7a4266..cde94514 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 1.67 2000/02/08 16:34:31 roberto Exp roberto $ 2** $Id: ldo.c,v 1.68 2000/03/03 14:58:26 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -86,7 +86,7 @@ void luaD_adjusttop (lua_State *L, StkId base, int extra) {
86 else { 86 else {
87 luaD_checkstack(L, diff); 87 luaD_checkstack(L, diff);
88 while (diff--) 88 while (diff--)
89 ttype(L->top++) = LUA_T_NIL; 89 ttype(L->top++) = TAG_NIL;
90 } 90 }
91} 91}
92 92
@@ -191,29 +191,29 @@ void luaD_call (lua_State *L, StkId func, int nResults) {
191 lua_Dbghook callhook = L->callhook; 191 lua_Dbghook callhook = L->callhook;
192 retry: /* for `function' tag method */ 192 retry: /* for `function' tag method */
193 switch (ttype(func)) { 193 switch (ttype(func)) {
194 case LUA_T_CPROTO: 194 case TAG_CPROTO:
195 ttype(func) = LUA_T_CMARK; 195 ttype(func) = TAG_CMARK;
196 firstResult = callC(L, fvalue(func), func+1); 196 firstResult = callC(L, fvalue(func), func+1);
197 break; 197 break;
198 case LUA_T_LPROTO: 198 case TAG_LPROTO:
199 ttype(func) = LUA_T_LMARK; 199 ttype(func) = TAG_LMARK;
200 firstResult = luaV_execute(L, NULL, tfvalue(func), func+1); 200 firstResult = luaV_execute(L, NULL, tfvalue(func), func+1);
201 break; 201 break;
202 case LUA_T_LCLOSURE: { 202 case TAG_LCLOSURE: {
203 Closure *c = clvalue(func); 203 Closure *c = clvalue(func);
204 ttype(func) = LUA_T_LCLMARK; 204 ttype(func) = TAG_LCLMARK;
205 firstResult = luaV_execute(L, c, tfvalue(c->consts), func+1); 205 firstResult = luaV_execute(L, c, tfvalue(c->consts), func+1);
206 break; 206 break;
207 } 207 }
208 case LUA_T_CCLOSURE: { 208 case TAG_CCLOSURE: {
209 Closure *c = clvalue(func); 209 Closure *c = clvalue(func);
210 ttype(func) = LUA_T_CCLMARK; 210 ttype(func) = TAG_CCLMARK;
211 firstResult = callCclosure(L, c, func+1); 211 firstResult = callCclosure(L, c, func+1);
212 break; 212 break;
213 } 213 }
214 default: { /* `func' is not a function; check the `function' tag method */ 214 default: { /* `func' is not a function; check the `function' tag method */
215 const TObject *im = luaT_getimbyObj(L, func, IM_FUNCTION); 215 const TObject *im = luaT_getimbyObj(L, func, IM_FUNCTION);
216 if (ttype(im) == LUA_T_NIL) 216 if (ttype(im) == TAG_NIL)
217 luaG_callerror(L, func); 217 luaG_callerror(L, func);
218 luaD_openstack(L, func); 218 luaD_openstack(L, func);
219 *func = *im; /* tag method is the new function to be called */ 219 *func = *im; /* tag method is the new function to be called */
@@ -298,7 +298,7 @@ static int protectedparser (lua_State *L, ZIO *z, int bin) {
298 StkId base = L->Cstack.base; 298 StkId base = L->Cstack.base;
299 int numCblocks = L->numCblocks; 299 int numCblocks = L->numCblocks;
300 int status; 300 int status;
301 TProtoFunc *volatile tf; 301 Proto *volatile tf;
302 struct lua_longjmp *volatile oldErr = L->errorJmp; 302 struct lua_longjmp *volatile oldErr = L->errorJmp;
303 L->errorJmp = &myErrorJmp; 303 L->errorJmp = &myErrorJmp;
304 L->top = base; /* clear C2Lua */ 304 L->top = base; /* clear C2Lua */
@@ -316,7 +316,7 @@ static int protectedparser (lua_State *L, ZIO *z, int bin) {
316 L->errorJmp = oldErr; 316 L->errorJmp = oldErr;
317 if (status) return 1; /* error code */ 317 if (status) return 1; /* error code */
318 if (tf == NULL) return 2; /* `natural' end */ 318 if (tf == NULL) return 2; /* `natural' end */
319 L->top->ttype = LUA_T_LPROTO; /* push new function on the stack */ 319 L->top->ttype = TAG_LPROTO; /* push new function on the stack */
320 L->top->value.tf = tf; 320 L->top->value.tf = tf;
321 incr_top; 321 incr_top;
322 return 0; 322 return 0;
@@ -345,7 +345,7 @@ static int do_main (lua_State *L, ZIO *z, int bin) {
345 345
346void luaD_gcIM (lua_State *L, const TObject *o) { 346void luaD_gcIM (lua_State *L, const TObject *o) {
347 const TObject *im = luaT_getimbyObj(L, o, IM_GC); 347 const TObject *im = luaT_getimbyObj(L, o, IM_GC);
348 if (ttype(im) != LUA_T_NIL) { 348 if (ttype(im) != TAG_NIL) {
349 luaD_checkstack(L, 2); 349 luaD_checkstack(L, 2);
350 *(L->top++) = *im; 350 *(L->top++) = *im;
351 *(L->top++) = *o; 351 *(L->top++) = *o;