1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

(scm_frame_unwind, scm_frame_unwind_handler): Renamed and changed all

uses.  (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
This commit is contained in:
Marius Vollmer 2004-01-11 00:51:19 +00:00
parent 327967ef26
commit 16c5cac25a
5 changed files with 33 additions and 29 deletions

View file

@ -367,8 +367,8 @@ scm_c_call_with_unblocked_asyncs (void *(*proc) (void *data), void *data)
void void
scm_frame_block_asyncs () scm_frame_block_asyncs ()
{ {
scm_frame_rewind (increase_block, NULL, SCM_F_WIND_EXPLICITLY); scm_frame_rewind_handler (increase_block, NULL, SCM_F_WIND_EXPLICITLY);
scm_frame_unwind (decrease_block, NULL, SCM_F_WIND_EXPLICITLY); scm_frame_unwind_handler (decrease_block, NULL, SCM_F_WIND_EXPLICITLY);
} }
void void
@ -377,8 +377,8 @@ scm_frame_unblock_asyncs ()
if (scm_root->block_asyncs == 0) if (scm_root->block_asyncs == 0)
scm_misc_error ("scm_with_unblocked_asyncs", scm_misc_error ("scm_with_unblocked_asyncs",
"asyncs already unblocked", SCM_EOL); "asyncs already unblocked", SCM_EOL);
scm_frame_rewind (decrease_block, NULL, SCM_F_WIND_EXPLICITLY); scm_frame_rewind_handler (decrease_block, NULL, SCM_F_WIND_EXPLICITLY);
scm_frame_unwind (increase_block, NULL, SCM_F_WIND_EXPLICITLY); scm_frame_unwind_handler (increase_block, NULL, SCM_F_WIND_EXPLICITLY);
} }

View file

@ -120,8 +120,8 @@ scm_internal_dynamic_wind (scm_t_guard before,
SCM ans; SCM ans;
scm_frame_begin (SCM_F_FRAME_REWINDABLE); scm_frame_begin (SCM_F_FRAME_REWINDABLE);
scm_frame_rewind (before, guard_data, SCM_F_WIND_EXPLICITLY); scm_frame_rewind_handler (before, guard_data, SCM_F_WIND_EXPLICITLY);
scm_frame_unwind (after, guard_data, SCM_F_WIND_EXPLICITLY); scm_frame_unwind_handler (after, guard_data, SCM_F_WIND_EXPLICITLY);
ans = inner (inner_data); ans = inner (inner_data);
scm_frame_end (); scm_frame_end ();
return ans; return ans;
@ -188,8 +188,8 @@ winder_mark (SCM w)
} }
void void
scm_frame_unwind (void (*proc) (void *), void *data, scm_frame_unwind_handler (void (*proc) (void *), void *data,
scm_t_wind_flags flags) scm_t_wind_flags flags)
{ {
SCM w; SCM w;
scm_t_bits fl = ((flags&SCM_F_WIND_EXPLICITLY)? WINDER_F_EXPLICIT : 0); scm_t_bits fl = ((flags&SCM_F_WIND_EXPLICITLY)? WINDER_F_EXPLICIT : 0);
@ -199,8 +199,8 @@ scm_frame_unwind (void (*proc) (void *), void *data,
} }
void void
scm_frame_rewind (void (*proc) (void *), void *data, scm_frame_rewind_handler (void (*proc) (void *), void *data,
scm_t_wind_flags flags) scm_t_wind_flags flags)
{ {
SCM w; SCM w;
SCM_NEWSMOB2 (w, tc16_winder | WINDER_F_REWIND, SCM_NEWSMOB2 (w, tc16_winder | WINDER_F_REWIND,
@ -211,8 +211,8 @@ scm_frame_rewind (void (*proc) (void *), void *data,
} }
void void
scm_frame_unwind_with_scm (void (*proc) (SCM), SCM data, scm_frame_unwind_handler_with_scm (void (*proc) (SCM), SCM data,
scm_t_wind_flags flags) scm_t_wind_flags flags)
{ {
SCM w; SCM w;
scm_t_bits fl = ((flags&SCM_F_WIND_EXPLICITLY)? WINDER_F_EXPLICIT : 0); scm_t_bits fl = ((flags&SCM_F_WIND_EXPLICITLY)? WINDER_F_EXPLICIT : 0);
@ -222,8 +222,8 @@ scm_frame_unwind_with_scm (void (*proc) (SCM), SCM data,
} }
void void
scm_frame_rewind_with_scm (void (*proc) (SCM), SCM data, scm_frame_rewind_handler_with_scm (void (*proc) (SCM), SCM data,
scm_t_wind_flags flags) scm_t_wind_flags flags)
{ {
SCM w; SCM w;
SCM_NEWSMOB2 (w, tc16_winder | WINDER_F_REWIND | WINDER_F_MARK, SCM_NEWSMOB2 (w, tc16_winder | WINDER_F_REWIND | WINDER_F_MARK,

View file

@ -53,15 +53,15 @@ typedef enum {
SCM_API void scm_frame_begin (scm_t_frame_flags); SCM_API void scm_frame_begin (scm_t_frame_flags);
SCM_API void scm_frame_end (void); SCM_API void scm_frame_end (void);
SCM_API void scm_frame_unwind (void (*func) (void *), void *data, SCM_API void scm_frame_unwind_handler (void (*func) (void *), void *data,
scm_t_wind_flags); scm_t_wind_flags);
SCM_API void scm_frame_rewind (void (*func) (void *), void *data, SCM_API void scm_frame_rewind_handler (void (*func) (void *), void *data,
scm_t_wind_flags); scm_t_wind_flags);
SCM_API void scm_frame_unwind_with_scm (void (*func) (SCM), SCM data, SCM_API void scm_frame_unwind_handler_with_scm (void (*func) (SCM), SCM data,
scm_t_wind_flags); scm_t_wind_flags);
SCM_API void scm_frame_rewind_with_scm (void (*func) (SCM), SCM data, SCM_API void scm_frame_rewind_handler_with_scm (void (*func) (SCM), SCM data,
scm_t_wind_flags); scm_t_wind_flags);
#ifdef GUILE_DEBUG #ifdef GUILE_DEBUG
SCM_API SCM scm_wind_chain (void); SCM_API SCM scm_wind_chain (void);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1996,1997,2000,2001 Free Software Foundation, Inc. /* Copyright (C) 1996,1997,2000,2001, 2004 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -229,8 +229,10 @@ scm_c_with_fluids (SCM fluids, SCM values, SCM (*cproc) (), void *cdata)
data = scm_cons (fluids, values); data = scm_cons (fluids, values);
scm_frame_begin (SCM_F_FRAME_REWINDABLE); scm_frame_begin (SCM_F_FRAME_REWINDABLE);
scm_frame_rewind_with_scm (swap_fluids, data, SCM_F_WIND_EXPLICITLY); scm_frame_rewind_handler_with_scm (swap_fluids, data,
scm_frame_unwind_with_scm (swap_fluids_reverse, data, SCM_F_WIND_EXPLICITLY); SCM_F_WIND_EXPLICITLY);
scm_frame_unwind_handler_with_scm (swap_fluids_reverse, data,
SCM_F_WIND_EXPLICITLY);
ans = cproc (cdata); ans = cproc (cdata);
scm_frame_end (); scm_frame_end ();
return ans; return ans;
@ -275,8 +277,8 @@ void
scm_frame_fluid (SCM fluid, SCM value) scm_frame_fluid (SCM fluid, SCM value)
{ {
SCM data = scm_cons (fluid, value); SCM data = scm_cons (fluid, value);
scm_frame_rewind_with_scm (swap_fluid, data, SCM_F_WIND_EXPLICITLY); scm_frame_rewind_handler_with_scm (swap_fluid, data, SCM_F_WIND_EXPLICITLY);
scm_frame_unwind_with_scm (swap_fluid, data, SCM_F_WIND_EXPLICITLY); scm_frame_unwind_handler_with_scm (swap_fluid, data, SCM_F_WIND_EXPLICITLY);
} }
void void

View file

@ -453,8 +453,10 @@ scm_frame_current_foo_port (SCM port,
data->getter = getter; data->getter = getter;
data->setter = setter; data->setter = setter;
scm_frame_rewind_with_scm (swap_port, scm_data, SCM_F_WIND_EXPLICITLY); scm_frame_rewind_handler_with_scm (swap_port, scm_data,
scm_frame_unwind_with_scm (swap_port, scm_data, SCM_F_WIND_EXPLICITLY); SCM_F_WIND_EXPLICITLY);
scm_frame_unwind_handler_with_scm (swap_port, scm_data,
SCM_F_WIND_EXPLICITLY);
} }
void void