summaryrefslogtreecommitdiff
path: root/libguile/fluids.h
diff options
context:
space:
mode:
authorBrian Templeton <bpt@hcoop.net>2010-08-14 18:35:17 -0400
committerAndy Wingo <wingo@pobox.com>2010-12-07 13:21:01 +0100
commitef94624eaf549ca9c730d4650b9dfed2ee48521b (patch)
tree5cc8343605d2fa9e9aac28bd3328ab71cdb01e7b /libguile/fluids.h
parentd1079217947013dac495a95e433ad5da9f7aa80a (diff)
downloadguile-ef94624eaf549ca9c730d4650b9dfed2ee48521b.tar.gz
unbound fluids
* libguile/fluids.c (scm_make_undefined_fluid, scm_fluid_unset_x) (scm_fluid_bound_p): New functions. (fluid_ref): New function; like scm_fluid_ref, but will not throw an error for unbound fluids. (scm_fluid_ref, swap_fluid): Use `fluid_ref'. * libguile/fluids.h (scm_make_undefined_fluid, scm_fluid_unset_x) (scm_fluid_bound_p): New prototypes. * libguile/vm-i-system.c (fluid_ref): If fluid is unbound, jump to `vm_error_unbound_fluid'. * libguile/vm-engine.c (VM_NAME)[vm_error_unbound_fluid]: New error message. * test-suite/tests/fluids.test ("unbound fluids")["fluid-ref of unbound fluid", "fluid-bound? of bound fluid", "fluid-bound? of unbound fluid", "unbound fluids can be set", "bound fluids can be unset"]: New tests.
Diffstat (limited to 'libguile/fluids.h')
-rw-r--r--libguile/fluids.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/fluids.h b/libguile/fluids.h
index d8374149a..db82203fe 100644
--- a/libguile/fluids.h
+++ b/libguile/fluids.h
@@ -60,10 +60,13 @@
#endif
SCM_API SCM scm_make_fluid (void);
+SCM_API SCM scm_make_undefined_fluid (void);
SCM_API int scm_is_fluid (SCM obj);
SCM_API SCM scm_fluid_p (SCM fl);
SCM_API SCM scm_fluid_ref (SCM fluid);
SCM_API SCM scm_fluid_set_x (SCM fluid, SCM value);
+SCM_API SCM scm_fluid_unset_x (SCM fluid);
+SCM_API SCM scm_fluid_bound_p (SCM fluid);
SCM_INTERNAL SCM scm_i_make_with_fluids (size_t n, SCM *fluids, SCM *vals);
SCM_INTERNAL void scm_i_swap_with_fluids (SCM with_fluids, SCM dynamic_state);