1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

(scm_make_initial_fluids, scm_copy_fluids, scm_swap_fluids,

scm_swap_fluids_reverse): Renamed to scm_i_... since they are
internal.  Changed all uses.
This commit is contained in:
Marius Vollmer 2004-01-06 18:08:31 +00:00
parent a520e4f0d0
commit a52dbe0177
4 changed files with 13 additions and 13 deletions

View file

@ -35,7 +35,7 @@ static volatile long n_fluids;
scm_t_bits scm_tc16_fluid; scm_t_bits scm_tc16_fluid;
SCM SCM
scm_make_initial_fluids () scm_i_make_initial_fluids ()
{ {
return scm_c_make_vector (INITIAL_FLUIDS, SCM_BOOL_F); return scm_c_make_vector (INITIAL_FLUIDS, SCM_BOOL_F);
} }
@ -65,7 +65,7 @@ grow_fluids (scm_root_state *root_state, int new_length)
} }
void void
scm_copy_fluids (scm_root_state *root_state) scm_i_copy_fluids (scm_root_state *root_state)
{ {
grow_fluids (root_state, SCM_VECTOR_LENGTH (root_state->fluids)); grow_fluids (root_state, SCM_VECTOR_LENGTH (root_state->fluids));
} }
@ -153,7 +153,7 @@ SCM_DEFINE (scm_fluid_set_x, "fluid-set!", 2, 0, 0,
#undef FUNC_NAME #undef FUNC_NAME
void void
scm_swap_fluids (SCM fluids, SCM vals) scm_i_swap_fluids (SCM fluids, SCM vals)
{ {
while (!SCM_NULL_OR_NIL_P (fluids)) while (!SCM_NULL_OR_NIL_P (fluids))
{ {
@ -170,13 +170,13 @@ scm_swap_fluids (SCM fluids, SCM vals)
same fluid appears multiple times in the fluids list. */ same fluid appears multiple times in the fluids list. */
void void
scm_swap_fluids_reverse (SCM fluids, SCM vals) scm_i_swap_fluids_reverse (SCM fluids, SCM vals)
{ {
if (!SCM_NULL_OR_NIL_P (fluids)) if (!SCM_NULL_OR_NIL_P (fluids))
{ {
SCM fl, old_val; SCM fl, old_val;
scm_swap_fluids_reverse (SCM_CDR (fluids), SCM_CDR (vals)); scm_i_swap_fluids_reverse (SCM_CDR (fluids), SCM_CDR (vals));
fl = SCM_CAR (fluids); fl = SCM_CAR (fluids);
old_val = scm_fluid_ref (fl); old_val = scm_fluid_ref (fl);
scm_fluid_set_x (fl, SCM_CAR (vals)); scm_fluid_set_x (fl, SCM_CAR (vals));
@ -215,11 +215,11 @@ scm_c_with_fluids (SCM fluids, SCM values, SCM (*cproc) (), void *cdata)
if (flen != vlen) if (flen != vlen)
scm_out_of_range (s_scm_with_fluids, values); scm_out_of_range (s_scm_with_fluids, values);
scm_swap_fluids (fluids, values); scm_i_swap_fluids (fluids, values);
scm_dynwinds = scm_acons (fluids, values, scm_dynwinds); scm_dynwinds = scm_acons (fluids, values, scm_dynwinds);
ans = cproc (cdata); ans = cproc (cdata);
scm_dynwinds = SCM_CDR (scm_dynwinds); scm_dynwinds = SCM_CDR (scm_dynwinds);
scm_swap_fluids_reverse (fluids, values); scm_i_swap_fluids_reverse (fluids, values);
return ans; return ans;
} }
#undef FUNC_NAME #undef FUNC_NAME

View file

@ -76,10 +76,10 @@ SCM_API SCM scm_c_with_fluid (SCM fluid, SCM val,
SCM (*cproc)(void *), void *cdata); SCM (*cproc)(void *), void *cdata);
SCM_API SCM scm_with_fluids (SCM fluids, SCM vals, SCM thunk); SCM_API SCM scm_with_fluids (SCM fluids, SCM vals, SCM thunk);
SCM_API SCM scm_make_initial_fluids (void); SCM_API SCM scm_i_make_initial_fluids (void);
SCM_API void scm_copy_fluids (scm_root_state *); SCM_API void scm_i_copy_fluids (scm_root_state *);
SCM_API void scm_swap_fluids (SCM fluids, SCM vals); SCM_API void scm_i_swap_fluids (SCM fluids, SCM vals);
SCM_API void scm_swap_fluids_reverse (SCM fluids, SCM vals); SCM_API void scm_i_swap_fluids_reverse (SCM fluids, SCM vals);
SCM_API void scm_init_fluids (void); SCM_API void scm_init_fluids (void);

View file

@ -152,7 +152,7 @@ start_stack (void *base)
scm_exitval = SCM_BOOL_F; /* vestigial */ scm_exitval = SCM_BOOL_F; /* vestigial */
scm_root->fluids = scm_make_initial_fluids (); scm_root->fluids = scm_i_make_initial_fluids ();
/* Create an object to hold the root continuation. /* Create an object to hold the root continuation.
*/ */

View file

@ -112,7 +112,7 @@ scm_make_root (SCM parent)
if (SCM_ROOTP (parent)) if (SCM_ROOTP (parent))
/* Must be done here so that fluids are GC protected */ /* Must be done here so that fluids are GC protected */
scm_copy_fluids (root_state); scm_i_copy_fluids (root_state);
return root; return root;
} }