diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-07-08 15:21:33 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-07-08 15:21:33 -0300 |
commit | 39b2d58c39fd0cd554b27ed071926bc439338964 (patch) | |
tree | 6855ede1b0e908439476e54396f94ae9ad275269 /lgc.c | |
parent | d2d24f09713cfecf59a7688c45a3863a35f09254 (diff) | |
download | lua-39b2d58c39fd0cd554b27ed071926bc439338964.tar.gz lua-39b2d58c39fd0cd554b27ed071926bc439338964.tar.bz2 lua-39b2d58c39fd0cd554b27ed071926bc439338964.zip |
new interface for debug hooks
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 | ||
453 | static void callGCTM (lua_State *L) { | 453 | static 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 | ||