1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

* Deprecated function scm_call_catching_errors.

* Updated root-smob initialization.
This commit is contained in:
Dirk Herrmann 2000-07-18 07:02:57 +00:00
parent 007e7c3588
commit cc4feeca51
5 changed files with 31 additions and 6 deletions

4
NEWS
View file

@ -79,6 +79,10 @@ SCM_ORD_SIG, SCM_NUM_SIGS
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
Use scm_memory_error instead of SCM_NALLOC. Use scm_memory_error instead of SCM_NALLOC.
** Deprecated function: scm_call_catching_errors
Use scm_catch or scm_lazy_catch from throw.[ch] instead.
Changes since Guile 1.3.4: Changes since Guile 1.3.4:

View file

@ -42,6 +42,8 @@ In release 1.6:
SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
SCM_ORD_SIG, SCM_NUM_SIGS SCM_ORD_SIG, SCM_NUM_SIGS
- remove function scm_call_catching_errors
(replaced by catch functions from throw.[ch])
Modules sort.c and random.c should be factored out into separate Modules sort.c and random.c should be factored out into separate

View file

@ -1,3 +1,10 @@
2000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
* root.[ch] (scm_call_catching_errors): Deprecated.
* root.c (scm_init_root): Initialize the root smob type using the
standard initialization functions.
2000-07-17 Marius Vollmer <mvo@zagadka.ping.de> 2000-07-17 Marius Vollmer <mvo@zagadka.ping.de>
* eval.c (unmemocopy): Don't rely on V being a list of at least * eval.c (unmemocopy): Don't rely on V being a list of at least

View file

@ -399,12 +399,13 @@ scm_apply_with_dynamic_root (SCM proc, SCM a1, SCM args, SCM handler)
#if (SCM_DEBUG_DEPRECATED == 0)
/* Call thunk(closure) underneath a top-level error handler. /* Call thunk(closure) underneath a top-level error handler.
* If an error occurs, pass the exitval through err_filter and return it. * If an error occurs, pass the exitval through err_filter and return it.
* If no error occurs, return the value of thunk. * If no error occurs, return the value of thunk.
*/ */
#ifdef _UNICOS #ifdef _UNICOS
typedef int setjmp_type; typedef int setjmp_type;
#else #else
@ -412,7 +413,6 @@ typedef long setjmp_type;
#endif #endif
SCM SCM
scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(), void *closure) scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(), void *closure)
{ {
@ -436,11 +436,15 @@ scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(), void *closure)
return answer; return answer;
} }
#endif /* SCM_DEBUG_DEPRECATED == 0 */
void void
scm_init_root () scm_init_root ()
{ {
scm_tc16_root = scm_make_smob_type_mfpe ("root", sizeof (struct scm_root_state), scm_tc16_root = scm_make_smob_type ("root", sizeof (struct scm_root_state));
mark_root, NULL, print_root, NULL); scm_set_smob_mark (scm_tc16_root, mark_root);
scm_set_smob_print (scm_tc16_root, print_root);
#include "libguile/root.x" #include "libguile/root.x"
} }

View file

@ -161,9 +161,17 @@ extern SCM scm_internal_cwdr (scm_catch_body_t body,
extern SCM scm_call_with_dynamic_root (SCM thunk, SCM handler); extern SCM scm_call_with_dynamic_root (SCM thunk, SCM handler);
extern SCM scm_dynamic_root (void); extern SCM scm_dynamic_root (void);
extern SCM scm_apply_with_dynamic_root (SCM proc, SCM a1, SCM args, SCM handler); extern SCM scm_apply_with_dynamic_root (SCM proc, SCM a1, SCM args, SCM handler);
extern SCM scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(), void * closure);
extern void scm_init_root (void); extern void scm_init_root (void);
#if (SCM_DEBUG_DEPRECATED == 0)
/* Use the catch functions from throw.[ch] instead of: */
extern SCM scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(), void * closure);
#endif /* SCM_DEBUG_DEPRECATED == 0 */
#endif /* ROOTH */ #endif /* ROOTH */
/* /*