From 8cd5191b27a5b141978d4a73693fb62ff8dada38 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Sun, 21 Mar 1999 05:02:42 +0000 Subject: [PATCH] * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold): Place the table argument last. --- libguile/hashtab.c | 6 +++--- libguile/hashtab.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libguile/hashtab.c b/libguile/hashtab.c index d0c79c282..8ef309217 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -532,7 +532,7 @@ scm_hashx_remove_x (hash, assoc, delete, table, obj) static const char s_hash_fold[]; 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); 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 -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), table, SCM_ARG1, s_hash_fold); SCM_ASSERT (SCM_NIMP (proc) && SCM_NFALSEP (scm_procedure_p (proc)), 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); } diff --git a/libguile/hashtab.h b/libguile/hashtab.h index dd24e4437..47cd71e41 100644 --- a/libguile/hashtab.h +++ b/libguile/hashtab.h @@ -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_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_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_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_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_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)); #endif /* HASHTABH */