diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-10 14:09:34 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-10 14:09:34 -0800 |
commit | 2c4d870ce98b425d07b136e12ba782cfc8e23367 (patch) | |
tree | 9aff5e1067516f4705517f57d0c3207aa94ab03c /eval.c | |
parent | 0f8e8e539d8c9c160e5832ccd20a72bd9038d023 (diff) | |
download | txr-2c4d870ce98b425d07b136e12ba782cfc8e23367.tar.gz txr-2c4d870ce98b425d07b136e12ba782cfc8e23367.tar.bz2 txr-2c4d870ce98b425d07b136e12ba782cfc8e23367.zip |
Better way for releasing deferred warnings.
We should be re-throwing deferred warnings as ordinary
warnings, not dumping them to a stream.
* eval.c (eval_exception): Use uw_release_deferred_warnings
instead of uw_dupm_deferred_warnings.
(load): Likewise.
* parser.c (read_eval_ret_last): Likewise.
* txr.c (txr_main): Likewise.
* unwind.c (uw_release_deferred_warnings): New function.
* unwind.h (uw_release_deferred_warnings): Declared.
* txr.1: Documented release-deferred-warnings and updated
documentation for dump-deferred-warnings.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -225,7 +225,7 @@ noreturn static void eval_exception(val sym, val ctx, val fmt, va_list vl) (void) vformat(stream, fmt, vl); - uw_dump_deferred_warnings(std_error); + uw_release_deferred_warnings(); uw_throw(sym, get_string_from_stream(stream)); } @@ -1330,7 +1330,7 @@ val eval_intrinsic(val form, val env) val form_ex = (last_form_expanded = last_form_evaled = nil, expand(form, nil)); val loading = cdr(lookup_var(dyn_env, load_recursive_s)); - val ret = ((void) (loading || uw_dump_deferred_warnings(std_error)), + val ret = ((void) (loading || uw_release_deferred_warnings()), eval(form_ex, default_bool_arg(env), form)); last_form_expanded = lfx_save; last_form_evaled = lfe_save; @@ -3858,7 +3858,7 @@ val load(val target) dyn_env = saved_dyn_env; if (!rec) - uw_dump_deferred_warnings(std_error); + uw_release_deferred_warnings(); uw_unwind { close_stream(stream, nil); |