dynwind.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* classes: h_files */
  2. #ifndef SCM_DYNWIND_H
  3. #define SCM_DYNWIND_H
  4. /* Copyright (C) 1995,1996,1998,1999,2000,2003,2004, 2006, 2008, 2011, 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. #include "libguile/__scm.h"
  22. #include "libguile/dynstack.h"
  23. SCM_API SCM scm_dynamic_wind (SCM thunk1, SCM thunk2, SCM thunk3);
  24. SCM_INTERNAL void scm_init_dynwind (void);
  25. SCM_API void scm_swap_bindings (SCM vars, SCM vals);
  26. typedef enum {
  27. SCM_F_DYNWIND_REWINDABLE = SCM_F_DYNSTACK_FRAME_REWINDABLE
  28. } scm_t_dynwind_flags;
  29. typedef enum {
  30. SCM_F_WIND_EXPLICITLY = SCM_F_DYNSTACK_WINDER_EXPLICIT
  31. } scm_t_wind_flags;
  32. SCM_API void scm_dynwind_begin (scm_t_dynwind_flags);
  33. SCM_API void scm_dynwind_end (void);
  34. SCM_API void scm_dynwind_unwind_handler (void (*func) (void *), void *data,
  35. scm_t_wind_flags);
  36. SCM_API void scm_dynwind_rewind_handler (void (*func) (void *), void *data,
  37. scm_t_wind_flags);
  38. SCM_API void scm_dynwind_unwind_handler_with_scm (void (*func) (SCM), SCM data,
  39. scm_t_wind_flags);
  40. SCM_API void scm_dynwind_rewind_handler_with_scm (void (*func) (SCM), SCM data,
  41. scm_t_wind_flags);
  42. SCM_API void scm_dynwind_free (void *mem);
  43. #endif /* SCM_DYNWIND_H */
  44. /*
  45. Local Variables:
  46. c-file-style: "gnu"
  47. End:
  48. */