From f044da55c5b0c0cf444a25e5bd9a76fea5a95f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 26 Oct 2009 23:38:13 +0100 Subject: [PATCH] Use proper assoc/hash function types in `hashtab.c'. This is a followup to d587c9e8b27219e68f8813fb648fc6913c93be0f ("Use proper types for hash/assoc functions in `hashtab.h'."). * libguile/hashtab.c (scm_i_rehash, scm_hash_fn_create_handle_x, scm_hash_fn_ref, scm_hash_fn_set_x, scm_hash_fn_remove_x): Use `scm_t_hash_fn' and `scm_t_assoc_fn' as appropriate. --- libguile/hashtab.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 69d604a08..511197781 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -207,7 +207,7 @@ make_hash_table (int flags, unsigned long k, const char *func_name) void scm_i_rehash (SCM table, - unsigned long (*hash_fn)(), + scm_t_hash_fn hash_fn, void *closure, const char* func_name) { @@ -472,8 +472,9 @@ scm_hash_fn_get_handle (SCM table, SCM obj, SCM -scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init, unsigned long (*hash_fn)(), - SCM (*assoc_fn)(), void * closure) +scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init, + scm_t_hash_fn hash_fn, scm_t_assoc_fn assoc_fn, + void * closure) #define FUNC_NAME "scm_hash_fn_create_handle_x" { int weak = 0; @@ -563,9 +564,10 @@ scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init, unsigned long (*hash_ #undef FUNC_NAME -SCM -scm_hash_fn_ref (SCM table, SCM obj, SCM dflt, unsigned long (*hash_fn)(), - SCM (*assoc_fn)(), void * closure) +SCM +scm_hash_fn_ref (SCM table, SCM obj, SCM dflt, + scm_t_hash_fn hash_fn, scm_t_assoc_fn assoc_fn, + void *closure) { SCM it = scm_hash_fn_get_handle (table, obj, hash_fn, assoc_fn, closure); if (scm_is_pair (it)) @@ -577,9 +579,10 @@ scm_hash_fn_ref (SCM table, SCM obj, SCM dflt, unsigned long (*hash_fn)(), -SCM -scm_hash_fn_set_x (SCM table, SCM obj, SCM val, unsigned long (*hash_fn)(), - SCM (*assoc_fn)(), void * closure) +SCM +scm_hash_fn_set_x (SCM table, SCM obj, SCM val, + scm_t_hash_fn hash_fn, scm_t_assoc_fn assoc_fn, + void *closure) { SCM it; @@ -591,8 +594,8 @@ scm_hash_fn_set_x (SCM table, SCM obj, SCM val, unsigned long (*hash_fn)(), SCM scm_hash_fn_remove_x (SCM table, SCM obj, - unsigned long (*hash_fn)(), - SCM (*assoc_fn)(), + scm_t_hash_fn hash_fn, + scm_t_assoc_fn assoc_fn, void *closure) { int weak = 0;