summaryrefslogtreecommitdiff
path: root/libguile/dynwind.c
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-10-02 22:18:52 +0100
committerNeil Jerram <neil@ossau.uklinux.net>2009-10-02 22:20:47 +0100
commitb25aa0b9373d2798469e0fe999cd915e8beedc4f (patch)
treea52083d17cd71cb53c7c0721d1317a1eb4cfbaf3 /libguile/dynwind.c
parent0eb934f1f0e4d607a13cb918f062054556e9694b (diff)
downloadguile-b25aa0b9373d2798469e0fe999cd915e8beedc4f.tar.gz
Change dynwind flag enums to #defines, for greater portability
Thanks to Inge Gutheil for raising this problem. * doc/ref/api-control.texi (Dynamic Wind): Remove doc for scm_t_dynwind_flags, and change uses of scm_t_dynwind_flags to int. Mention possible flags inside doc for scm_dynwind_begin instead. Similarly for scm_t_wind_flags. In this case the doc on possible flags is moved to after the four functions that can use them. * libguile/dynwind.c (scm_dynwind_begin): Change scm_t_dynwind_flags to int. (scm_dynwind_unwind_handler): Change scm_t_wind_flags to int. (scm_dynwind_rewind_handler): Ditto. (scm_dynwind_unwind_handler_with_scm): Ditto. (scm_dynwind_rewind_handler_with_scm): Ditto. * libguile/dynwind.h (SCM_F_DYNWIND_REWINDABLE): Use #define instead of typedef enum. (SCM_F_WIND_EXPLICITLY): Ditto. (function declarations): Change scm_t_dynwind_flags and scm_t_wind_flags to int. * test-suite/standalone/test-unwind.c (check_cont_body): Change scm_t_dynwind_flags to int.
Diffstat (limited to 'libguile/dynwind.c')
-rw-r--r--libguile/dynwind.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/libguile/dynwind.c b/libguile/dynwind.c
index b34f9bef3..8e87f6098 100644
--- a/libguile/dynwind.c
+++ b/libguile/dynwind.c
@@ -154,7 +154,7 @@ static scm_t_bits tc16_winder;
#define WINDER_MARK_P(w) (SCM_SMOB_FLAGS(w) & WINDER_F_MARK)
void
-scm_dynwind_begin (scm_t_dynwind_flags flags)
+scm_dynwind_begin (int flags)
{
SCM f;
SCM_NEWSMOB (f, tc16_frame, 0);
@@ -192,8 +192,7 @@ scm_dynwind_end (void)
}
void
-scm_dynwind_unwind_handler (void (*proc) (void *), void *data,
- scm_t_wind_flags flags)
+scm_dynwind_unwind_handler (void (*proc) (void *), void *data, int flags)
{
SCM w;
SCM_NEWSMOB2 (w, tc16_winder, (scm_t_bits) proc, (scm_t_bits) data);
@@ -203,8 +202,7 @@ scm_dynwind_unwind_handler (void (*proc) (void *), void *data,
}
void
-scm_dynwind_rewind_handler (void (*proc) (void *), void *data,
- scm_t_wind_flags flags)
+scm_dynwind_rewind_handler (void (*proc) (void *), void *data, int flags)
{
SCM w;
SCM_NEWSMOB2 (w, tc16_winder, (scm_t_bits) proc, (scm_t_bits) data);
@@ -215,8 +213,7 @@ scm_dynwind_rewind_handler (void (*proc) (void *), void *data,
}
void
-scm_dynwind_unwind_handler_with_scm (void (*proc) (SCM), SCM data,
- scm_t_wind_flags flags)
+scm_dynwind_unwind_handler_with_scm (void (*proc) (SCM), SCM data, int flags)
{
SCM w;
scm_t_bits fl = ((flags&SCM_F_WIND_EXPLICITLY)? WINDER_F_EXPLICIT : 0);
@@ -226,8 +223,7 @@ scm_dynwind_unwind_handler_with_scm (void (*proc) (SCM), SCM data,
}
void
-scm_dynwind_rewind_handler_with_scm (void (*proc) (SCM), SCM data,
- scm_t_wind_flags flags)
+scm_dynwind_rewind_handler_with_scm (void (*proc) (SCM), SCM data, int flags)
{
SCM w;
SCM_NEWSMOB2 (w, tc16_winder, (scm_t_bits) proc, SCM_UNPACK (data));