From bce6572579a7e6c7a96895d9280396b3b33b8f3f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Jan 2001 09:45:51 -0200 Subject: new macros + new names to facilitate compilation of threaded version --- ldo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index ec7897f9..c17385e4 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 1.115 2001/01/19 13:20:30 roberto Exp roberto $ +** $Id: ldo.c,v 1.116 2001/01/24 15:45:33 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -94,9 +94,9 @@ static void dohook (lua_State *L, lua_Debug *ar, lua_Hook hook) { StkId old_top = L->Cbase = L->top; luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ L->allowhooks = 0; /* cannot call hooks inside a hook */ - LUA_EXIT; + LUA_UNLOCK; (*hook)(L, ar); - LUA_ENTRY; + LUA_LOCK; lua_assert(L->allowhooks == 0); L->allowhooks = 1; L->top = old_top; @@ -135,9 +135,9 @@ static StkId callCclosure (lua_State *L, const struct Closure *cl, StkId base) { luaD_checkstack(L, nup+LUA_MINSTACK); /* ensure minimum stack size */ for (n=0; ntop++, &cl->upvalue[n]); - LUA_EXIT; + LUA_UNLOCK; n = (*cl->f.c)(L); /* do the actual call */ - LUA_ENTRY; + LUA_LOCK; L->Cbase = old_Cbase; /* restore old C base */ return L->top - n; /* return index of first result */ } @@ -219,13 +219,13 @@ LUA_API int lua_call (lua_State *L, int nargs, int nresults) { StkId func; struct CallS c; int status; - LUA_ENTRY; + LUA_LOCK; func = L->top - (nargs+1); /* function to be called */ c.func = func; c.nresults = nresults; status = luaD_runprotected(L, f_call, &c); if (status != 0) /* an error occurred? */ L->top = func; /* remove parameters from the stack */ - LUA_EXIT; + LUA_UNLOCK; return status; } @@ -249,7 +249,7 @@ static int protectedparser (lua_State *L, ZIO *z, int bin) { struct ParserS p; mem_int old_blocks; int status; - LUA_ENTRY; + LUA_LOCK; p.z = z; p.bin = bin; luaC_checkGC(L); old_blocks = G(L)->nblocks; @@ -261,7 +261,7 @@ static int protectedparser (lua_State *L, ZIO *z, int bin) { } else if (status == LUA_ERRRUN) /* an error occurred: correct error code */ status = LUA_ERRSYNTAX; - LUA_EXIT; + LUA_UNLOCK; return status; } -- cgit v1.2.3-55-g6feb