summaryrefslogtreecommitdiff
path: root/libguile/hashtab.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-08-02 16:14:04 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-08-02 16:14:04 +0000
commitb9bd8526f055eeef0acc42c269eb5ec67546159f (patch)
treef2561facb5d3a08f72839a166e89eda9e7b4136e /libguile/hashtab.c
parent531bf3e6a84faf61107b4a8a5288a2a757d17c6e (diff)
downloadguile-b9bd8526f055eeef0acc42c269eb5ec67546159f.tar.gz
* numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num, scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long): Discouraged by moving to discouraged.h and discouraged.c and reimplementing in terms of scm_from_* and scm_to_*. Changed all uses to the new scm_from_* and scm_to_* functions.
Diffstat (limited to 'libguile/hashtab.c')
-rw-r--r--libguile/hashtab.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 311827cce..754fc2198 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -171,7 +171,7 @@ scm_i_rehash (SCM table,
handle = SCM_CAR (ls);
h = hash_fn (SCM_CAR (handle), new_size, closure);
if (h >= new_size)
- scm_out_of_range (func_name, scm_ulong2num (h));
+ scm_out_of_range (func_name, scm_from_ulong (h));
SCM_VECTOR_SET (new_buckets, h,
scm_cons (handle, SCM_VELTS (new_buckets)[h]));
ls = SCM_CDR (ls);
@@ -433,7 +433,7 @@ scm_hash_fn_get_handle (SCM table, SCM obj, unsigned long (*hash_fn)(), SCM (*as
return SCM_BOOL_F;
k = hash_fn (obj, SCM_VECTOR_LENGTH (table), closure);
if (k >= SCM_VECTOR_LENGTH (table))
- scm_out_of_range ("hash_fn_get_handle", scm_ulong2num (k));
+ scm_out_of_range ("hash_fn_get_handle", scm_from_ulong (k));
h = assoc_fn (obj, SCM_VELTS (table)[k], closure);
return h;
}
@@ -461,7 +461,7 @@ scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init, unsigned long (*hash_
k = hash_fn (obj, SCM_VECTOR_LENGTH (buckets), closure);
if (k >= SCM_VECTOR_LENGTH (buckets))
- scm_out_of_range ("hash_fn_create_handle_x", scm_ulong2num (k));
+ scm_out_of_range ("hash_fn_create_handle_x", scm_from_ulong (k));
it = assoc_fn (obj, SCM_VELTS (buckets)[k], closure);
if (scm_is_true (it))
return it;
@@ -530,7 +530,7 @@ scm_hash_fn_remove_x (SCM table, SCM obj, unsigned long (*hash_fn)(), SCM (*asso
k = hash_fn (obj, SCM_VECTOR_LENGTH (buckets), closure);
if (k >= SCM_VECTOR_LENGTH (buckets))
- scm_out_of_range ("hash_fn_remove_x", scm_ulong2num (k));
+ scm_out_of_range ("hash_fn_remove_x", scm_from_ulong (k));
h = assoc_fn (obj, SCM_VELTS (buckets)[k], closure);
if (scm_is_true (h))
{
@@ -772,9 +772,7 @@ typedef struct scm_t_ihashx_closure
static unsigned long
scm_ihashx (SCM obj, unsigned long n, scm_t_ihashx_closure *closure)
{
- SCM answer = scm_call_2 (closure->hash,
- obj,
- scm_ulong2num ((unsigned long) n));
+ SCM answer = scm_call_2 (closure->hash, obj, scm_from_ulong (n));
return scm_to_ulong (answer);
}