(scm_internal_with_fluids): Deprecated.
authorMarius Vollmer <mvo@zagadka.de>
Sat, 19 May 2001 00:36:22 +0000 (00:36 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Sat, 19 May 2001 00:36:22 +0000 (00:36 +0000)
(scm_c_with_fluids): Renamed from scm_internal_with_fluids.
(scm_c_with_fluid): New.
(scm_with_fluids): Use scm_c_with_fluids instead of
scm_internal_with_fluids.

libguile/fluids.c
libguile/fluids.h

index a5bc280..0283467 100644 (file)
@@ -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"
index 7b67318..c80d1e6 100644 (file)
@@ -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 */
 
 /*