Commit | Line | Data |
---|---|---|
c27f5738 | 1 | /* Cleanups. |
42a4f53d | 2 | Copyright (C) 1986-2019 Free Software Foundation, Inc. |
c27f5738 DE |
3 | |
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 3 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
18 | ||
1a5c2598 TT |
19 | #ifndef COMMON_CLEANUPS_H |
20 | #define COMMON_CLEANUPS_H | |
c27f5738 | 21 | |
b10faa68 DE |
22 | /* Outside of cleanups.c, this is an opaque type. */ |
23 | struct cleanup; | |
c27f5738 DE |
24 | |
25 | /* NOTE: cagney/2000-03-04: This typedef is strictly for the | |
26 | make_cleanup function declarations below. Do not use this typedef | |
27 | as a cast when passing functions into the make_cleanup() code. | |
28 | Instead either use a bounce function or add a wrapper function. | |
29 | Calling a f(char*) function with f(void*) is non-portable. */ | |
30 | typedef void (make_cleanup_ftype) (void *); | |
31 | ||
b10faa68 DE |
32 | /* Function type for the dtor in make_cleanup_dtor. */ |
33 | typedef void (make_cleanup_dtor_ftype) (void *); | |
34 | ||
c27f5738 DE |
35 | extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *); |
36 | ||
fe7b42e5 | 37 | extern void do_final_cleanups (); |
c27f5738 | 38 | |
1a5c2598 | 39 | #endif /* COMMON_CLEANUPS_H */ |