diff options
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/fluids.c | 29 | ||||
-rw-r--r-- | libguile/fluids.h | 14 |
2 files changed, 37 insertions, 6 deletions
diff --git a/libguile/fluids.c b/libguile/fluids.c index a5bc280af..0283467c8 100644 --- a/libguile/fluids.c +++ b/libguile/fluids.c @@ -51,6 +51,7 @@ #include "libguile/alist.h" #include "libguile/eval.h" #include "libguile/ports.h" +#include "libguile/deprecation.h" #define INITIAL_FLUIDS 10 #include "libguile/validate.h" @@ -224,13 +225,13 @@ SCM_DEFINE (scm_with_fluids, "with-fluids*", 3, 0, 0, "one after another. @var{thunk} must be a procedure with no argument.") #define FUNC_NAME s_scm_with_fluids { - return scm_internal_with_fluids (fluids, values, apply_thunk, (void *) SCM_UNPACK (thunk)); + return scm_c_with_fluids (fluids, values, apply_thunk, (void *) SCM_UNPACK (thunk)); } #undef FUNC_NAME SCM -scm_internal_with_fluids (SCM fluids, SCM values, SCM (*cproc) (), void *cdata) -#define FUNC_NAME "scm_internal_with_fluids" +scm_c_with_fluids (SCM fluids, SCM values, SCM (*cproc) (), void *cdata) +#define FUNC_NAME "scm_c_with_fluids" { SCM ans; int flen, vlen; @@ -249,7 +250,14 @@ scm_internal_with_fluids (SCM fluids, SCM values, SCM (*cproc) (), void *cdata) } #undef FUNC_NAME - +SCM +scm_c_with_fluid (SCM fluid, SCM value, SCM (*cproc) (), void *cdata) +#define FUNC_NAME "scm_c_with_fluid" +{ + return scm_c_with_fluids (SCM_LIST1 (fluid), SCM_LIST1 (value), + cproc, cdata); +} +#undef FUNC_NAME void scm_init_fluids () @@ -261,6 +269,19 @@ scm_init_fluids () #endif } +#if SCM_DEBUG_DEPRECATED == 0 + +SCM +scm_internal_with_fluids (SCM fluids, SCM values, SCM (*cproc) (), void *cdata) +{ + scm_c_issue_deprecation_warning ("`scm_internal_with_fluids' is deprecated. " + "Use `scm_c_with_fluids' instead."); + + return scm_c_with_fluids (fluids, values, cproc, cdata); +} + +#endif + /* Local Variables: c-file-style: "gnu" diff --git a/libguile/fluids.h b/libguile/fluids.h index 7b67318be..c80d1e696 100644 --- a/libguile/fluids.h +++ b/libguile/fluids.h @@ -95,8 +95,10 @@ SCM scm_fluid_p (SCM fl); SCM scm_fluid_ref (SCM fluid); SCM scm_fluid_set_x (SCM fluid, SCM value); -SCM scm_internal_with_fluids (SCM fluids, SCM vals, - SCM (*cproc)(void *), void *cdata); +SCM scm_c_with_fluids (SCM fluids, SCM vals, + SCM (*cproc)(void *), void *cdata); +SCM scm_c_with_fluid (SCM fluid, SCM val, + SCM (*cproc)(void *), void *cdata); SCM scm_with_fluids (SCM fluids, SCM vals, SCM thunk); SCM scm_make_initial_fluids (void); @@ -106,6 +108,14 @@ void scm_swap_fluids_reverse (SCM fluids, SCM vals); void scm_init_fluids (void); +#if SCM_DEBUG_DEPRECATED == 0 + +/* Use scm_c_with_fluids instead. */ +SCM scm_internal_with_fluids (SCM fluids, SCM vals, + SCM (*cproc)(void *), void *cdata); + +#endif + #endif /* !FLUIDSH */ /* |