From c0a5d8883541452d292c23a90ff4af445df22a05 Mon Sep 17 00:00:00 2001 From: Michael Livshin Date: Thu, 4 Jan 2001 13:00:31 +0000 Subject: * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P, SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P, SET_DESTROYED): new defines/macros. (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted. (add_to_live_list): takes a `guardian_t *' now, not SCM. (guardian_print): print more info. (guardian_apply): check if the guardian is destroyed, and throw an error if so. take one more optional argument `throw_p'. (scm_guard): depending on the value of `throw_p', return a boolean result. (scm_get_one_zombie): remove redundant property test. (guardian_t): represent the various (currently 3, I hope nothing more gets added) boolean fields as bit flags. (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates. (scm_destroy_guardian_x): new procedure. * guardians.h: added prototypes for `scm_guardian_greedy_p' and `scm_guardian_destroyed_p'. changed prototype for `scm_guard'. --- libguile/guardians.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libguile/guardians.h') diff --git a/libguile/guardians.h b/libguile/guardians.h index e6fadea9a..eb79c1305 100644 --- a/libguile/guardians.h +++ b/libguile/guardians.h @@ -47,9 +47,13 @@ #include "libguile/__scm.h" SCM scm_make_guardian (SCM greedy_p); +SCM scm_destroy_guardian_x (SCM guardian); + +SCM scm_guardian_greedy_p (SCM guardian); +SCM scm_guardian_destroyed_p (SCM guardian); /* these are to be called from C: */ -void scm_guard (SCM guardian, SCM obj); +SCM scm_guard (SCM guardian, SCM obj, int throw_p); SCM scm_get_one_zombie (SCM guardian); void scm_init_guardians (void); -- cgit v1.2.3