Use proper types for hash/assoc functions in `hashtab.h'.
authorLudovic Courtès <ludo@gnu.org>
Mon, 19 Oct 2009 22:10:18 +0000 (00:10 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 19 Oct 2009 22:10:18 +0000 (00:10 +0200)
commitd587c9e8b27219e68f8813fb648fc6913c93be0f
treed407902e1f8a1bc25b365631be54f5d656b17662
parent416c9fb363a2b2f31382c5a488c6e27c31a3b62f
Use proper types for hash/assoc functions in `hashtab.h'.

Partly fixes bug #23681 ("Function declarators with empty parentheses
should not be used").

* libguile/goops.c (scm_wrap_component): Cast `scm_sloppy_assq'.

* libguile/hashtab.c (scm_hash_fn_get_handle): Update to take functions
  of type `scm_t_hash_fn' and `scm_t_assoc_fn'.  Update callers.
  (scm_ihashx): Change to match `scm_t_hash_fn'.
  (scm_sloppy_assx): Change to match `scm_t_assoc_fn'.

* libguile/hashtab.h (scm_t_hash_fn, scm_t_assoc_fn): New types.
  (scm_t_hashtable)[hash_fn]: Change to `scm_t_hash_fn'.
  (scm_i_rehash, scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
  scm_hash_fn_ref, scm_hash_fn_set_x, scm_hash_fn_remove_x): Change to
  take `scm_t_hash_fn' and `scm_t_assoc_fn' parameters.

* libguile/srcprop.h (scm_whash_get_handle, scm_whash_create_handle,
  scm_whash_lookup): Implement in terms of `scm_hashq_*' instead of
  `scm_hash_fn_*'.

* libguile/struct.c (scm_struct_ihashq): Change to match
  `scm_t_hash_fn'.
  (scm_struct_create_handle): Cast `scm_sloppy_assq'.

* libguile/struct.h (scm_struct_ihashq): Update, make internal.
libguile/goops.c
libguile/hashtab.c
libguile/hashtab.h
libguile/srcprop.h
libguile/struct.c
libguile/struct.h