summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-01 03:26:52 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-01 03:26:52 -0800
commitf746b568d797d6b35571968b838d540147dde3f9 (patch)
tree07aecde49e9b509bc9e72f87ada9c23738e15b07 /lib.c
parente7de6f8ba3463c3744d7affbc2bbb87c40c2d674 (diff)
downloadtxr-f746b568d797d6b35571968b838d540147dde3f9.tar.gz
txr-f746b568d797d6b35571968b838d540147dde3f9.tar.bz2
txr-f746b568d797d6b35571968b838d540147dde3f9.zip
* lib.c (d): Disable garbage collection around the dump.
It's importa for this function not to have the side effect of triggering garbage collection, when it is used for debugging issues that show up under --gc-debug.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 4213f0d4..d490a2c1 100644
--- a/lib.c
+++ b/lib.c
@@ -5577,7 +5577,9 @@ void dump(val obj, val out)
*/
void d(val obj)
{
+ int save = gc_state(0);
dump(obj, std_output);
+ gc_state(save);
}
/*