1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Ludovic Courtès 2009-10-02 15:02:52 +02:00
parent 98241dc53f
commit b8ec9daba6
3 changed files with 14 additions and 4 deletions

View file

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

View file

@ -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)
{

View file

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