Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: gdb/cleanups.h

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/charset.c ('k') | gdb/cleanups.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Cleanups.
2 Copyright (C) 1986, 1988-2005, 2007-2012 Free Software Foundation, Inc.
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
19 #ifndef CLEANUPS_H
20 #define CLEANUPS_H
21
22 /* Outside of cleanups.c, this is an opaque type. */
23 struct cleanup;
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
32 /* Function type for the dtor in make_cleanup_dtor. */
33 typedef void (make_cleanup_dtor_ftype) (void *);
34
35 /* WARNING: The result of the "make cleanup" routines is not the intuitive
36 choice of being a handle on the just-created cleanup. Instead it is an
37 opaque handle of the cleanup mechanism and represents all cleanups created
38 from that point onwards.
39 The result is guaranteed to be non-NULL though. */
40
41 extern struct cleanup *make_cleanup (make_cleanup_ftype *, void *);
42
43 extern struct cleanup *make_cleanup_dtor (make_cleanup_ftype *, void *,
44 make_cleanup_dtor_ftype *);
45
46 extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *);
47
48 /* A special value to pass to do_cleanups and do_final_cleanups
49 to tell them to do all cleanups. */
50 extern struct cleanup *all_cleanups (void);
51
52 extern void do_cleanups (struct cleanup *);
53 extern void do_final_cleanups (struct cleanup *);
54
55 extern void discard_cleanups (struct cleanup *);
56 extern void discard_final_cleanups (struct cleanup *);
57
58 extern struct cleanup *save_cleanups (void);
59 extern struct cleanup *save_final_cleanups (void);
60
61 extern void restore_cleanups (struct cleanup *);
62 extern void restore_final_cleanups (struct cleanup *);
63
64 /* A no-op cleanup.
65 This is useful when you want to establish a known reference point
66 to pass to do_cleanups. */
67 extern void null_cleanup (void *);
68
69 #endif /* CLEANUPS_H */
OLDNEW
« no previous file with comments | « gdb/charset.c ('k') | gdb/cleanups.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698