diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-26 07:01:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-26 07:01:54 -0700 |
commit | 88268ee75421084cc412d26250beb7483f49c1b3 (patch) | |
tree | 1a800929f70578eff57ccf389b51bf51a71fa015 /lib.c | |
parent | ea81292fa7d10df029d1e938e086bed648ab1120 (diff) | |
download | txr-88268ee75421084cc412d26250beb7483f49c1b3.tar.gz txr-88268ee75421084cc412d26250beb7483f49c1b3.tar.bz2 txr-88268ee75421084cc412d26250beb7483f49c1b3.zip |
obj_print: uw guard frame only when circ printing.
* lib.c (obj_print): Only set up and tear down the
continuation-blocking unwind frame when doing circle
printing.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -9497,7 +9497,8 @@ val obj_print(val obj, val out, val pretty) struct strm_ctx *volatile ctx = ctx_orig, ctx_struct; uw_frame_t cont_guard; - uw_push_guard(&cont_guard, 1); + if (ctx_orig) + uw_push_guard(&cont_guard, 1); uw_simple_catch_begin; @@ -9528,7 +9529,8 @@ val obj_print(val obj, val out, val pretty) uw_catch_end; - uw_pop_frame(&cont_guard); + if (ctx_orig) + uw_pop_frame(&cont_guard); return ret; } |