summaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-22 10:51:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-22 10:51:44 -0300
commit21107d7c2c2615b92fae723bbb3dad2127ed1c64 (patch)
tree1ea201a8352388c9f2122227d4c4951febd63935 /ldo.c
parentb5cd7d426fdfea4984234edc4ad1316063bd0917 (diff)
downloadlua-github-21107d7c2c2615b92fae723bbb3dad2127ed1c64.tar.gz
debug state is restored after a dofile/dostring
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldo.c b/ldo.c
index 9787e76f..146125a6 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 1.31 1999/02/04 17:47:59 roberto Exp roberto $
+** $Id: ldo.c,v 1.32 1999/02/12 19:23:02 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -329,6 +329,7 @@ static int protectedparser (ZIO *z, int bin) {
static int do_main (ZIO *z, int bin) {
int status;
+ int debug = L->debug; /* save debug status */
do {
long old_blocks = (luaC_checkGC(), L->nblocks);
status = protectedparser(z, bin);
@@ -341,6 +342,7 @@ static int do_main (ZIO *z, int bin) {
L->GCthreshold -= newelems2;
}
} while (bin && status == 0);
+ L->debug = debug; /* restore debug status */
return status;
}