From 39b2d58c39fd0cd554b27ed071926bc439338964 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 8 Jul 2002 15:21:33 -0300 Subject: new interface for debug hooks --- lgc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lgc.c') diff --git a/lgc.c b/lgc.c index c9bcf666..991ff51d 100644 --- a/lgc.c +++ b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 1.140 2002/07/01 17:06:58 roberto Exp roberto $ +** $Id: lgc.c,v 1.141 2002/07/04 17:57:42 roberto Exp $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -451,8 +451,8 @@ static void do1gcTM (lua_State *L, Udata *udata) { static void callGCTM (lua_State *L) { - int oldah = L->allowhooks; - L->allowhooks = 0; /* stop debug hooks during GC tag methods */ + int oldah = allowhook(L); + setallowhook(L, 0); /* stop debug hooks during GC tag methods */ L->top++; /* reserve space to keep udata while runs its gc method */ while (G(L)->tmudata != NULL) { Udata *udata = G(L)->tmudata; @@ -465,7 +465,7 @@ static void callGCTM (lua_State *L) { do1gcTM(L, udata); } L->top--; - L->allowhooks = oldah; /* restore hooks */ + setallowhook(L, oldah); /* restore hooks */ } -- cgit v1.2.3-55-g6feb