1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

* hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,

scm_hash_fn_remove_x): Make hash bucket index local variable k
unsigned.  Use scm_ulong2num to pass it to SCM_ASSERT as
accurately as possible.
This commit is contained in:
Jim Blandy 1998-09-06 18:15:27 +00:00
parent fd88bd7cc2
commit a085c2b43a

View file

@ -58,7 +58,7 @@ scm_hash_fn_get_handle (table, obj, hash_fn, assoc_fn, closure)
SCM (*assoc_fn)();
void * closure;
{
int k;
unsigned int k;
SCM h;
SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_get_handle");
@ -66,7 +66,7 @@ scm_hash_fn_get_handle (table, obj, hash_fn, assoc_fn, closure)
return SCM_EOL;
k = hash_fn (obj, SCM_LENGTH (table), closure);
SCM_ASSERT ((0 <= k) && (k < SCM_LENGTH (table)),
SCM_MAKINUM (k),
scm_ulong2num (k),
SCM_OUTOFRANGE,
"hash_fn_get_handle");
h = assoc_fn (obj, SCM_VELTS (table)[k], closure);
@ -84,7 +84,7 @@ scm_hash_fn_create_handle_x (table, obj, init, hash_fn, assoc_fn, closure)
SCM (*assoc_fn)();
void * closure;
{
int k;
unsigned int k;
SCM it;
SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_create_handle_x");
@ -92,7 +92,7 @@ scm_hash_fn_create_handle_x (table, obj, init, hash_fn, assoc_fn, closure)
return SCM_EOL;
k = hash_fn (obj, SCM_LENGTH (table), closure);
SCM_ASSERT ((0 <= k) && (k < SCM_LENGTH (table)),
SCM_MAKINUM (k),
scm_ulong2num (k),
SCM_OUTOFRANGE,
"hash_fn_create_handle_x");
SCM_REDEFER_INTS;
@ -165,7 +165,7 @@ scm_hash_fn_remove_x (table, obj, hash_fn, assoc_fn, delete_fn, closure)
SCM (*delete_fn)();
void * closure;
{
int k;
unsigned int k;
SCM h;
SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_remove_x");
@ -173,7 +173,7 @@ scm_hash_fn_remove_x (table, obj, hash_fn, assoc_fn, delete_fn, closure)
return SCM_EOL;
k = hash_fn (obj, SCM_LENGTH (table), closure);
SCM_ASSERT ((0 <= k) && (k < SCM_LENGTH (table)),
SCM_MAKINUM (k),
scm_ulong2num (k),
SCM_OUTOFRANGE,
"hash_fn_remove_x");
h = assoc_fn (obj, SCM_VELTS (table)[k], closure);