6 /* Copyright (C) 1995,1996,1998,1999,2000,2003,2004, 2006 Free Software Foundation, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #include "libguile/__scm.h"
29 typedef void (*scm_t_guard) (void *);
30 typedef SCM (*scm_t_inner) (void *);
32 SCM_API SCM scm_dynamic_wind (SCM thunk1, SCM thunk2, SCM thunk3);
33 SCM_API SCM scm_internal_dynamic_wind (scm_t_guard before,
38 SCM_API void scm_dowinds (SCM to, long delta);
39 SCM_API void scm_i_dowinds (SCM to, long delta,
40 void (*turn_func) (void *), void *data);
41 SCM_API void scm_init_dynwind (void);
43 SCM_API void scm_swap_bindings (SCM vars, SCM vals);
46 SCM_F_DYNWIND_REWINDABLE = (1 << 0)
47 } scm_t_dynwind_flags;
50 SCM_F_WIND_EXPLICITLY = (1 << 0)
53 SCM_API void scm_dynwind_begin (scm_t_dynwind_flags);
54 SCM_API void scm_dynwind_end (void);
56 SCM_API void scm_dynwind_unwind_handler (void (*func) (void *), void *data,
58 SCM_API void scm_dynwind_rewind_handler (void (*func) (void *), void *data,
61 SCM_API void scm_dynwind_unwind_handler_with_scm (void (*func) (SCM), SCM data,
63 SCM_API void scm_dynwind_rewind_handler_with_scm (void (*func) (SCM), SCM data,
66 SCM_API void scm_dynwind_free (void *mem);
69 SCM_API SCM scm_wind_chain (void);
70 #endif /*GUILE_DEBUG*/
72 #endif /* SCM_DYNWIND_H */