diff options
author | Andy Wingo <wingo@pobox.com> | 2010-06-19 13:43:33 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-06-19 13:43:33 +0200 |
commit | ec16eb7847895247be3438c25d2d27ce2e137b83 (patch) | |
tree | f63db2c446063ff7e481d7b374a5c1b61582d3c4 /libguile/throw.c | |
parent | a0d57eedfa135ae25bdb94274169aac362408bb9 (diff) | |
download | guile-ec16eb7847895247be3438c25d2d27ce2e137b83.tar.gz |
deprecate the-last-stack
* libguile/backtrace.h (scm_the_last_stack_fluid_var)
* libguile/backtrace.c (scm_init_backtrace): No more
scm_the_last_stack_fluid_var. The replacement is to resolve
`the-last-stack' in (ice-9 stack-catch).
(scm_backtrace_with_highlights): Accordingly, instead of backtracing
the last stack, backtrace the current stack.
* libguile/throw.h:
* libguile/throw.c:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_internal_stack_catch): Deprecate this
function.
* module/ice-9/save-stack.scm (the-last-stack): Move here from boot-9.
* module/ice-9/debug.scm:
* module/ice-9/debugger.scm: Use (ice-9 save-stack) for the-last-stack.
* module/ice-9/deprecated.scm (the-last-stack): Add deprecated shim.
Diffstat (limited to 'libguile/throw.c')
-rw-r--r-- | libguile/throw.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/libguile/throw.c b/libguile/throw.c index 3e95fb3e0..a6f04e116 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -253,50 +253,6 @@ scm_c_with_throw_handler (SCM tag, } -/* scm_internal_stack_catch - Use this one if you want debugging information to be stored in - scm_the_last_stack_fluid_var on error. */ - -static SCM -ss_handler (void *data SCM_UNUSED, SCM tag, SCM throw_args) -{ - /* Save the stack */ - scm_fluid_set_x (SCM_VARIABLE_REF (scm_the_last_stack_fluid_var), - scm_make_stack (SCM_BOOL_T, SCM_EOL)); - /* Throw the error */ - return scm_throw (tag, throw_args); -} - -struct cwss_data -{ - SCM tag; - scm_t_catch_body body; - void *data; -}; - -static SCM -cwss_body (void *data) -{ - struct cwss_data *d = data; - return scm_c_with_throw_handler (d->tag, d->body, d->data, ss_handler, NULL, 0); -} - -SCM -scm_internal_stack_catch (SCM tag, - scm_t_catch_body body, - void *body_data, - scm_t_catch_handler handler, - void *handler_data) -{ - struct cwss_data d; - d.tag = tag; - d.body = body; - d.data = body_data; - return scm_internal_catch (tag, cwss_body, &d, handler, handler_data); -} - - - /* body and handler functions for use with any of the above catch variants */ /* This is a body function you can pass to scm_internal_catch if you |