1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

* hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):

Place the table argument last.
This commit is contained in:
Mikael Djurfeldt 1999-03-21 05:02:42 +00:00
parent 4177648ed1
commit 8cd5191b27
2 changed files with 5 additions and 5 deletions

View file

@ -532,7 +532,7 @@ scm_hashx_remove_x (hash, assoc, delete, table, obj)
static const char s_hash_fold[]; static const char s_hash_fold[];
SCM SCM
scm_internal_hash_fold (SCM table, SCM (*fn) (), void *closure, SCM init) scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
{ {
int i, n = SCM_LENGTH (table); int i, n = SCM_LENGTH (table);
SCM result = init; SCM result = init;
@ -562,13 +562,13 @@ fold_proc (void *proc, SCM key, SCM data, SCM value)
SCM_PROC (s_hash_fold, "hash-fold", 3, 0, 0, scm_hash_fold); SCM_PROC (s_hash_fold, "hash-fold", 3, 0, 0, scm_hash_fold);
SCM SCM
scm_hash_fold (SCM table, SCM proc, SCM init) scm_hash_fold (SCM proc, SCM init, SCM table)
{ {
SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table),
table, SCM_ARG1, s_hash_fold); table, SCM_ARG1, s_hash_fold);
SCM_ASSERT (SCM_NIMP (proc) && SCM_NFALSEP (scm_procedure_p (proc)), SCM_ASSERT (SCM_NIMP (proc) && SCM_NFALSEP (scm_procedure_p (proc)),
proc, SCM_ARG2, s_hash_fold); proc, SCM_ARG2, s_hash_fold);
return scm_internal_hash_fold (table, fold_proc, (void *) proc, init); return scm_internal_hash_fold (fold_proc, (void *) proc, init, table);
} }

View file

@ -58,7 +58,7 @@ extern SCM scm_hash_fn_create_handle_x SCM_P ((SCM table, SCM obj, SCM init, uns
extern SCM scm_hash_fn_ref SCM_P ((SCM table, SCM obj, SCM dflt, unsigned int (*hash_fn) (), SCM (*assoc_fn) (), void * closure)); extern SCM scm_hash_fn_ref SCM_P ((SCM table, SCM obj, SCM dflt, unsigned int (*hash_fn) (), SCM (*assoc_fn) (), void * closure));
extern SCM scm_hash_fn_set_x SCM_P ((SCM table, SCM obj, SCM val, unsigned int (*hash_fn) (), SCM (*assoc_fn) (), void * closure)); extern SCM scm_hash_fn_set_x SCM_P ((SCM table, SCM obj, SCM val, unsigned int (*hash_fn) (), SCM (*assoc_fn) (), void * closure));
extern SCM scm_hash_fn_remove_x SCM_P ((SCM table, SCM obj, unsigned int (*hash_fn) (), SCM (*assoc_fn) (), SCM (*delete_fn) (), void * closure)); extern SCM scm_hash_fn_remove_x SCM_P ((SCM table, SCM obj, unsigned int (*hash_fn) (), SCM (*assoc_fn) (), SCM (*delete_fn) (), void * closure));
extern SCM scm_internal_hash_fold SCM_P ((SCM table, SCM (*fn) (), void *closure, SCM init)); extern SCM scm_internal_hash_fold SCM_P ((SCM (*fn) (), void *closure, SCM init, SCM table));
extern SCM scm_hashq_get_handle SCM_P ((SCM table, SCM obj)); extern SCM scm_hashq_get_handle SCM_P ((SCM table, SCM obj));
extern SCM scm_hashq_create_handle_x SCM_P ((SCM table, SCM obj, SCM init)); extern SCM scm_hashq_create_handle_x SCM_P ((SCM table, SCM obj, SCM init));
@ -80,7 +80,7 @@ extern SCM scm_hashx_create_handle_x SCM_P ((SCM hash, SCM assoc, SCM table, SCM
extern SCM scm_hashx_ref SCM_P ((SCM hash, SCM assoc, SCM table, SCM obj, SCM dflt)); extern SCM scm_hashx_ref SCM_P ((SCM hash, SCM assoc, SCM table, SCM obj, SCM dflt));
extern SCM scm_hashx_set_x SCM_P ((SCM hash, SCM assoc, SCM table, SCM obj, SCM val)); extern SCM scm_hashx_set_x SCM_P ((SCM hash, SCM assoc, SCM table, SCM obj, SCM val));
extern SCM scm_hashx_remove_x SCM_P ((SCM hash, SCM assoc, SCM del, SCM table, SCM obj)); extern SCM scm_hashx_remove_x SCM_P ((SCM hash, SCM assoc, SCM del, SCM table, SCM obj));
extern SCM scm_hash_fold SCM_P ((SCM hash, SCM proc, SCM init)); extern SCM scm_hash_fold SCM_P ((SCM proc, SCM init, SCM hash));
extern void scm_init_hashtab SCM_P ((void)); extern void scm_init_hashtab SCM_P ((void));
#endif /* HASHTABH */ #endif /* HASHTABH */