cleanups.h 1.5 KB

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