Merge remote-tracking branch 'origin/stable-2.0'
[bpt/guile.git] / libguile / finalizers.h
1 #ifndef SCM_FINALIZERS_H
2 #define SCM_FINALIZERS_H
3
4 /* Copyright (C) 2012 Free Software Foundation, Inc.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21
22 \f
23
24 #include "libguile/__scm.h"
25
26 \f
27
28 typedef void (*scm_t_finalizer_proc) (void *obj, void *data);
29
30 SCM_INTERNAL void scm_i_set_finalizer (void *obj, scm_t_finalizer_proc,
31 void *data);
32 SCM_INTERNAL void scm_i_add_finalizer (void *obj, scm_t_finalizer_proc,
33 void *data);
34 SCM_INTERNAL void scm_i_add_resuscitator (void *obj, scm_t_finalizer_proc,
35 void *data);
36
37 SCM_INTERNAL void scm_i_finalizer_pre_fork (void);
38
39 SCM_INTERNAL void scm_init_finalizers (void);
40 SCM_INTERNAL void scm_init_finalizer_thread (void);
41
42 #endif /* SCM_FINALIZERS_H */