mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-03 16:20:39 +02:00
Switch all users of SCM_SIMPLE_VECTOR_LENGTH to scm_c_vector_length
* libguile/arrays.c: * libguile/eval.c: * libguile/filesys.c: * libguile/hash.c: * libguile/hashtab.c: * libguile/memoize.c: * libguile/modules.c: * libguile/poll.c: * libguile/posix.c: * libguile/print.c: * libguile/socket.c: * libguile/stime.c: Use C function instead of macro.
This commit is contained in:
parent
0a5d2ffb1a
commit
d73c675fa6
12 changed files with 34 additions and 34 deletions
|
@ -509,7 +509,7 @@ hashtable_lower (struct scm_t_hashtable *ht)
|
|||
static inline size_t
|
||||
hashtable_bucket_count (struct scm_t_hashtable *ht)
|
||||
{
|
||||
return SCM_SIMPLE_VECTOR_LENGTH (hashtable_buckets (ht));
|
||||
return scm_c_vector_length (hashtable_buckets (ht));
|
||||
}
|
||||
|
||||
static inline SCM
|
||||
|
@ -697,10 +697,10 @@ scm_hash_fn_get_handle (SCM table, SCM obj,
|
|||
struct scm_t_hashtable *ht = scm_to_hashtable (table);
|
||||
buckets = hashtable_buckets (ht);
|
||||
|
||||
if (SCM_SIMPLE_VECTOR_LENGTH (buckets) == 0)
|
||||
if (scm_c_vector_length (buckets) == 0)
|
||||
return SCM_BOOL_F;
|
||||
k = hash_fn (obj, SCM_SIMPLE_VECTOR_LENGTH (buckets), closure);
|
||||
if (k >= SCM_SIMPLE_VECTOR_LENGTH (buckets))
|
||||
k = hash_fn (obj, scm_c_vector_length (buckets), closure);
|
||||
if (k >= scm_c_vector_length (buckets))
|
||||
scm_out_of_range (FUNC_NAME, scm_from_ulong (k));
|
||||
|
||||
h = assoc_fn (obj, SCM_SIMPLE_VECTOR_REF (buckets, k), closure);
|
||||
|
@ -723,11 +723,11 @@ scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init,
|
|||
struct scm_t_hashtable *ht = scm_to_hashtable (table);
|
||||
buckets = hashtable_buckets (ht);
|
||||
|
||||
if (SCM_SIMPLE_VECTOR_LENGTH (buckets) == 0)
|
||||
if (scm_c_vector_length (buckets) == 0)
|
||||
SCM_MISC_ERROR ("void hashtable", SCM_EOL);
|
||||
|
||||
k = hash_fn (obj, SCM_SIMPLE_VECTOR_LENGTH (buckets), closure);
|
||||
if (k >= SCM_SIMPLE_VECTOR_LENGTH (buckets))
|
||||
k = hash_fn (obj, scm_c_vector_length (buckets), closure);
|
||||
if (k >= scm_c_vector_length (buckets))
|
||||
scm_out_of_range ("hash_fn_create_handle_x", scm_from_ulong (k));
|
||||
|
||||
it = assoc_fn (obj, SCM_SIMPLE_VECTOR_REF (buckets, k), closure);
|
||||
|
@ -746,8 +746,8 @@ scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init,
|
|||
if (!scm_is_eq (hashtable_buckets (ht), buckets))
|
||||
{
|
||||
buckets = hashtable_buckets (ht);
|
||||
k = hash_fn (obj, SCM_SIMPLE_VECTOR_LENGTH (buckets), closure);
|
||||
if (k >= SCM_SIMPLE_VECTOR_LENGTH (buckets))
|
||||
k = hash_fn (obj, scm_c_vector_length (buckets), closure);
|
||||
if (k >= scm_c_vector_length (buckets))
|
||||
scm_out_of_range ("hash_fn_create_handle_x", scm_from_ulong (k));
|
||||
}
|
||||
SCM_SETCDR (new_bucket, SCM_SIMPLE_VECTOR_REF (buckets, k));
|
||||
|
@ -808,11 +808,11 @@ scm_hash_fn_remove_x (SCM table, SCM obj,
|
|||
struct scm_t_hashtable *ht = scm_to_hashtable (table);
|
||||
buckets = hashtable_buckets (ht);
|
||||
|
||||
if (SCM_SIMPLE_VECTOR_LENGTH (buckets) == 0)
|
||||
if (scm_c_vector_length (buckets) == 0)
|
||||
return SCM_EOL;
|
||||
|
||||
k = hash_fn (obj, SCM_SIMPLE_VECTOR_LENGTH (buckets), closure);
|
||||
if (k >= SCM_SIMPLE_VECTOR_LENGTH (buckets))
|
||||
k = hash_fn (obj, scm_c_vector_length (buckets), closure);
|
||||
if (k >= scm_c_vector_length (buckets))
|
||||
scm_out_of_range (FUNC_NAME, scm_from_ulong (k));
|
||||
|
||||
h = assoc_fn (obj, SCM_SIMPLE_VECTOR_REF (buckets, k), closure);
|
||||
|
@ -1551,7 +1551,7 @@ scm_internal_hash_fold (scm_t_hash_fold_fn fn, void *closure,
|
|||
struct scm_t_hashtable *ht = scm_to_hashtable (table);
|
||||
buckets = hashtable_buckets (ht);
|
||||
|
||||
n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
|
||||
n = scm_c_vector_length (buckets);
|
||||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
SCM ls, handle;
|
||||
|
@ -1585,7 +1585,7 @@ scm_internal_hash_for_each_handle (scm_t_hash_handle_fn fn, void *closure,
|
|||
SCM_VALIDATE_HASHTABLE (0, table);
|
||||
struct scm_t_hashtable *ht = scm_to_hashtable (table);
|
||||
buckets = hashtable_buckets (ht);
|
||||
n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
|
||||
n = scm_c_vector_length (buckets);
|
||||
|
||||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue