Add new interface to catch/throw, usable from C as well as
authorJim Blandy <jimb@red-bean.com>
Mon, 9 Dec 1996 02:15:17 +0000 (02:15 +0000)
committerJim Blandy <jimb@red-bean.com>
Mon, 9 Dec 1996 02:15:17 +0000 (02:15 +0000)
commit650fa1abe5ebcbef3653f7267238ef3a9cc9847c
treeaa2d636901febdfa2fb2679a6890f289557cd144
parent10f74a138bc3bb3a7c473a97acf394d7d3c84eb9
Add new interface to catch/throw, usable from C as well as
Scheme.
* throw.h (scm_catch_body_t, scm_catch_handler_t): New types.
(scm_internal_catch): New function, replaces...
(scm_catch_apply): Deleted.
* throw.c (scm_catch_apply): Deleted; replaced with a more general
mechanism which is a bit more code, but can be used nicely from C
and implement the Scheme semantics as well.
(scm_internal_catch): This is the replacement; it's named after
the analogous function in Emacs.
(scm_catch): Reimplemented in terms of the above.
(struct catch_body_data, catch_body, catch_handler): New
functions, used by scm_catch.
* root.c (cwdr): Reimplemented in terms of scm_internal_catch.
(struct cwdr_body_data, cwdr_body, cwdr_handler): New functions;
support for new cwdr.
libguile/root.c
libguile/throw.c
libguile/throw.h