From 328dc9a3ef372c0e1a439afabebd44d0ab1edaa9 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sun, 9 Nov 2003 08:10:58 +0000 Subject: [PATCH] * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated public use of scm_m_expand_body in eval.h. In eval.c, renamed scm_m_expand_body to m_expand_body and made it static. Added deprecated wrapper scm_m_expand_body. (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead of scm_m_expand_body. --- NEWS | 11 +++++++++-- libguile/ChangeLog | 10 ++++++++++ libguile/eval.c | 24 +++++++++++++++++++----- libguile/eval.h | 4 +++- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 14e74b595..b8a6849dd 100644 --- a/NEWS +++ b/NEWS @@ -117,7 +117,7 @@ while the scripting code runs single-threadedly. We now use a modified version of libltdl that allows us to make improvements to it without having to rely on libtool releases. -* Changes to the standalone interpreter +* Changes to the stand-alone interpreter ** New command line option `--no-debug'. @@ -894,6 +894,12 @@ SCM_EVALIM, SCM_XEVAL, SCM_XEVALCAR These macros were used in the implementation of the evaluator. It's unlikely that they have been used by user code. +** Deprecated helper functions for evaluation and application: +scm_m_expand_body + +These functions were used in the implementation of the evaluator. It's +unlikely that they have been used by user code. + ** Deprecated macros for iloc handling: SCM_ILOC00, SCM_IDINC, SCM_IDSTMSK These macros were used in the implementation of the evaluator. It's unlikely @@ -908,7 +914,7 @@ SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED, scm_debug_newcell, scm_debug_newcell2, SCM_HUP_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_ORD_SIG, SCM_NUM_SIGS, -*top-level-lookup-closure*, scm_top_level_lookup_closure_var, +scm_top_level_lookup_closure_var, *top-level-lookup-closure*, scm_system_transformer, scm_eval_3, scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP, SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring, scm_tc7_substring, @@ -931,6 +937,7 @@ scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP, SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable + Changes since Guile 1.4: * Changes to the distribution diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 8273f36e6..cabb9a423 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,13 @@ +2003-11-09 Dirk Herrmann + + * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated + public use of scm_m_expand_body in eval.h. In eval.c, renamed + scm_m_expand_body to m_expand_body and made it static. Added + deprecated wrapper scm_m_expand_body. + + (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead + of scm_m_expand_body. + 2003-11-09 Kevin Ryde * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message diff --git a/libguile/eval.c b/libguile/eval.c index 266066ef7..901fa93c8 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -58,6 +58,7 @@ char *alloca (); #include "libguile/async.h" #include "libguile/continuations.h" #include "libguile/debug.h" +#include "libguile/deprecation.h" #include "libguile/dynwind.h" #include "libguile/eq.h" #include "libguile/feature.h" @@ -1827,8 +1828,8 @@ scm_m_undefine (SCM expr, SCM env) #endif -SCM -scm_m_expand_body (SCM xorig, SCM env) +static SCM +m_expand_body (const SCM xorig, const SCM env) { SCM x = SCM_CDR (xorig), defs = SCM_EOL; @@ -1888,6 +1889,19 @@ scm_m_expand_body (SCM xorig, SCM env) return xorig; } +#if (SCM_ENABLE_DEPRECATED == 1) + +/* Deprecated in guile 1.7.0 on 2003-11-09. */ +SCM +scm_m_expand_body (SCM exprs, SCM env) +{ + scm_c_issue_deprecation_warning + ("`scm_m_expand_body' is deprecated."); + return m_expand_body (exprs, env); +} + +#endif + SCM scm_macroexp (SCM x, SCM env) @@ -2301,7 +2315,7 @@ scm_eval_body (SCM code, SCM env) scm_rec_mutex_lock (&source_mutex); /* check for race condition */ if (SCM_ISYMP (SCM_CAR (code))) - code = scm_m_expand_body (code, env); + code = m_expand_body (code, env); scm_rec_mutex_unlock (&source_mutex); goto again; } @@ -2699,7 +2713,7 @@ dispatch: scm_rec_mutex_lock (&source_mutex); /* check for race condition */ if (SCM_ISYMP (SCM_CAR (x))) - x = scm_m_expand_body (x, env); + x = m_expand_body (x, env); scm_rec_mutex_unlock (&source_mutex); goto nontoplevel_begin; } @@ -4350,7 +4364,7 @@ tail: scm_rec_mutex_lock (&source_mutex); /* check for race condition */ if (SCM_ISYMP (SCM_CAR (proc))) - proc = scm_m_expand_body (proc, args); + proc = m_expand_body (proc, args); scm_rec_mutex_unlock (&source_mutex); goto again; } diff --git a/libguile/eval.h b/libguile/eval.h index c6f7a9bc3..3f6acb529 100644 --- a/libguile/eval.h +++ b/libguile/eval.h @@ -186,7 +186,6 @@ SCM_API scm_t_trampoline_2 scm_trampoline_2 (SCM proc); SCM_API SCM scm_nconc2last (SCM lst); SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args); SCM_API SCM scm_dapply (SCM proc, SCM arg1, SCM args); -SCM_API SCM scm_m_expand_body (SCM xorig, SCM env); SCM_API SCM scm_macroexp (SCM x, SCM env); SCM_API SCM scm_map (SCM proc, SCM arg1, SCM args); SCM_API SCM scm_for_each (SCM proc, SCM arg1, SCM args); @@ -210,6 +209,9 @@ SCM_API void scm_init_eval (void); SCM_API SCM scm_m_undefine (SCM x, SCM env); +/* Deprecated in guile 1.7.0 on 2003-11-09. */ +SCM_API SCM scm_m_expand_body (SCM xorig, SCM env); + #endif -- 2.20.1