summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-10-02 15:02:52 +0200
committerLudovic Courtès <ludo@gnu.org>2009-10-09 14:10:00 +0200
commitb8ec9daba60ceb14b443d3a44ab5043edcb474df (patch)
treea11271c845bfca0f695e17e59dd7b3d191fc805d
parent98241dc53fc66ec86c01b9eeea426def2f787cec (diff)
downloadguile-b8ec9daba60ceb14b443d3a44ab5043edcb474df.tar.gz
Deprecate `scm_mask_ints'.
* libguile/async.h (scm_mask_ints): Remove. * libguile/deprecated.c (scm_i_mask_ints): New. * libguile/deprecated.h (scm_mask_ints): New macro. (scm_i_mask_ints): New declaration.
-rw-r--r--libguile/async.h4
-rw-r--r--libguile/deprecated.c8
-rw-r--r--libguile/deprecated.h6
3 files changed, 14 insertions, 4 deletions
diff --git a/libguile/async.h b/libguile/async.h
index ba6c77c9b..f666437ed 100644
--- a/libguile/async.h
+++ b/libguile/async.h
@@ -29,10 +29,6 @@
-#define scm_mask_ints (SCM_I_CURRENT_THREAD->block_asyncs != 0)
-
-
-
SCM_API void scm_async_click (void);
SCM_API void scm_switch (void);
SCM_API SCM scm_async (SCM thunk);
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index a8aebeeee..df7ba4dc6 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -1467,6 +1467,14 @@ scm_i_defer_ints_etc ()
"Use a mutex instead if appropriate.");
}
+int
+scm_i_mask_ints (void)
+{
+ scm_c_issue_deprecation_warning ("`scm_mask_ints' is deprecated.");
+ return (SCM_I_CURRENT_THREAD->block_asyncs != 0);
+}
+
+
SCM
scm_guard (SCM guardian, SCM obj, int throw_p)
{
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 93738f1c0..ed1a105ee 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -576,6 +576,12 @@ SCM_DEPRECATED void scm_i_defer_ints_etc (void);
#define SCM_REDEFER_INTS scm_i_defer_ints_etc ()
#define SCM_REALLOW_INTS scm_i_defer_ints_etc ()
+/* In the old days (pre-1.8), this macro was sometimes used as an lvalue as
+ in "scm_mask_ints = 1" to block async execution. It no longer works. */
+#define scm_mask_ints (scm_i_mask_ints ())
+
+SCM_DEPRECATED int scm_i_mask_ints (void);
+
/* Deprecated since they are unnecessary and had not been documented.
*/
SCM_DEPRECATED SCM scm_guard (SCM guardian, SCM obj, int throw_p);