aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-08 16:01:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-08 16:01:38 -0300
commitcbc59592ff684b646b21766a66630df1f7974b25 (patch)
tree1e28529cda3b8f6baa63285f6a2571767c3ed05e /lgc.c
parent4905fdd1350bde68cd818b9198f28f5a47c208b0 (diff)
downloadlua-cbc59592ff684b646b21766a66630df1f7974b25.tar.gz
lua-cbc59592ff684b646b21766a66630df1f7974b25.tar.bz2
lua-cbc59592ff684b646b21766a66630df1f7974b25.zip
new definition for `luaD_call' and `luaD_adjusttop'
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lgc.c b/lgc.c
index fcd22a86..e7d533d3 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.100 2001/06/06 18:00:19 roberto Exp roberto $ 2** $Id: lgc.c,v 1.101 2001/06/07 15:01:21 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*/
@@ -338,12 +338,14 @@ static void callgcTM (lua_State *L, const TObject *obj) {
338 Closure *tm = luaT_gettmbyObj(G(L), obj, TM_GC); 338 Closure *tm = luaT_gettmbyObj(G(L), obj, TM_GC);
339 if (tm != NULL) { 339 if (tm != NULL) {
340 int oldah = L->allowhooks; 340 int oldah = L->allowhooks;
341 StkId top = L->top;
341 L->allowhooks = 0; /* stop debug hooks during GC tag methods */ 342 L->allowhooks = 0; /* stop debug hooks during GC tag methods */
342 luaD_checkstack(L, 2); 343 luaD_checkstack(L, 2);
343 setclvalue(L->top, tm); 344 setclvalue(top, tm);
344 setobj(L->top+1, obj); 345 setobj(top+1, obj);
345 L->top += 2; 346 L->top += 2;
346 luaD_call(L, L->top-2, 0); 347 luaD_call(L, top);
348 L->top = top; /* restore top */
347 L->allowhooks = oldah; /* restore hooks */ 349 L->allowhooks = oldah; /* restore hooks */
348 } 350 }
349} 351}