summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-07-08 15:21:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-07-08 15:21:33 -0300
commit39b2d58c39fd0cd554b27ed071926bc439338964 (patch)
tree6855ede1b0e908439476e54396f94ae9ad275269 /lgc.c
parentd2d24f09713cfecf59a7688c45a3863a35f09254 (diff)
downloadlua-39b2d58c39fd0cd554b27ed071926bc439338964.tar.gz
lua-39b2d58c39fd0cd554b27ed071926bc439338964.tar.bz2
lua-39b2d58c39fd0cd554b27ed071926bc439338964.zip
new interface for debug hooks
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lgc.c b/lgc.c
index c9bcf666..991ff51d 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.140 2002/07/01 17:06:58 roberto Exp roberto $ 2** $Id: lgc.c,v 1.141 2002/07/04 17:57:42 roberto Exp $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -451,8 +451,8 @@ static void do1gcTM (lua_State *L, Udata *udata) {
451 451
452 452
453static void callGCTM (lua_State *L) { 453static void callGCTM (lua_State *L) {
454 int oldah = L->allowhooks; 454 int oldah = allowhook(L);
455 L->allowhooks = 0; /* stop debug hooks during GC tag methods */ 455 setallowhook(L, 0); /* stop debug hooks during GC tag methods */
456 L->top++; /* reserve space to keep udata while runs its gc method */ 456 L->top++; /* reserve space to keep udata while runs its gc method */
457 while (G(L)->tmudata != NULL) { 457 while (G(L)->tmudata != NULL) {
458 Udata *udata = G(L)->tmudata; 458 Udata *udata = G(L)->tmudata;
@@ -465,7 +465,7 @@ static void callGCTM (lua_State *L) {
465 do1gcTM(L, udata); 465 do1gcTM(L, udata);
466 } 466 }
467 L->top--; 467 L->top--;
468 L->allowhooks = oldah; /* restore hooks */ 468 setallowhook(L, oldah); /* restore hooks */
469} 469}
470 470
471 471