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);