Bump version number for 1.9.9.
[bpt/guile.git] / libguile / dynwind.h
CommitLineData
0f2d19dd
JB
1/* classes: h_files */
2
0527e687
DH
3#ifndef SCM_DYNWIND_H
4#define SCM_DYNWIND_H
5
102dbb6f 6/* Copyright (C) 1995,1996,1998,1999,2000,2003,2004, 2006, 2008 Free Software Foundation, Inc.
0527e687 7 *
73be1d9e 8 * This library is free software; you can redistribute it and/or
53befeb7
NJ
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
0527e687 12 *
53befeb7
NJ
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
73be1d9e
MV
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
0527e687 17 *
73be1d9e
MV
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
53befeb7
NJ
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * 02110-1301 USA
73be1d9e 22 */
0527e687 23
0f2d19dd 24\f
0527e687 25
b4309c3c 26#include "libguile/__scm.h"
0f2d19dd
JB
27
28\f
0f2d19dd 29
92c2555f
MV
30typedef void (*scm_t_guard) (void *);
31typedef SCM (*scm_t_inner) (void *);
3346a90f 32
33b001fd
MV
33SCM_API SCM scm_dynamic_wind (SCM thunk1, SCM thunk2, SCM thunk3);
34SCM_API SCM scm_internal_dynamic_wind (scm_t_guard before,
35 scm_t_inner inner,
36 scm_t_guard after,
37 void *inner_data,
38 void *guard_data);
39SCM_API void scm_dowinds (SCM to, long delta);
102dbb6f
LC
40SCM_INTERNAL void scm_i_dowinds (SCM to, long delta,
41 void (*turn_func) (void *), void *data);
42SCM_INTERNAL void scm_init_dynwind (void);
0f2d19dd 43
33b001fd 44SCM_API void scm_swap_bindings (SCM vars, SCM vals);
2e171178 45
4845bbae 46typedef enum {
661ae7ab
MV
47 SCM_F_DYNWIND_REWINDABLE = (1 << 0)
48} scm_t_dynwind_flags;
4845bbae
MV
49
50typedef enum {
62f3c095 51 SCM_F_WIND_EXPLICITLY = (1 << 0)
4845bbae
MV
52} scm_t_wind_flags;
53
661ae7ab
MV
54SCM_API void scm_dynwind_begin (scm_t_dynwind_flags);
55SCM_API void scm_dynwind_end (void);
0888de4f 56
661ae7ab
MV
57SCM_API void scm_dynwind_unwind_handler (void (*func) (void *), void *data,
58 scm_t_wind_flags);
59SCM_API void scm_dynwind_rewind_handler (void (*func) (void *), void *data,
60 scm_t_wind_flags);
16c5cac2 61
661ae7ab
MV
62SCM_API void scm_dynwind_unwind_handler_with_scm (void (*func) (SCM), SCM data,
63 scm_t_wind_flags);
64SCM_API void scm_dynwind_rewind_handler_with_scm (void (*func) (SCM), SCM data,
65 scm_t_wind_flags);
62f3c095 66
661ae7ab 67SCM_API void scm_dynwind_free (void *mem);
6d5649b7 68
f3667f52 69#ifdef GUILE_DEBUG
33b001fd 70SCM_API SCM scm_wind_chain (void);
f3667f52
JB
71#endif /*GUILE_DEBUG*/
72
0527e687 73#endif /* SCM_DYNWIND_H */
89e00824
ML
74
75/*
76 Local Variables:
77 c-file-style: "gnu"
78 End:
79*/