mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
Fix of last change.
This commit is contained in:
parent
cbbeea6603
commit
110beb83a5
1 changed files with 5 additions and 7 deletions
|
@ -104,7 +104,10 @@ SCM weak_hashtables = SCM_EOL;
|
|||
static SCM
|
||||
make_hash_table (int flags, unsigned long k, const char *func_name) {
|
||||
SCM table, vector;
|
||||
int i, n = k ? k : 31;
|
||||
int i = 0, n = k ? k : 31;
|
||||
while (i < HASHTABLE_SIZE_N && n > hashtable_size[i])
|
||||
++i;
|
||||
n = hashtable_size[i];
|
||||
if (flags)
|
||||
/* The SCM_WVECTF_NOSCAN flag informs the weak vector code not to
|
||||
perform the final scan for broken references. Instead we do
|
||||
|
@ -116,15 +119,10 @@ make_hash_table (int flags, unsigned long k, const char *func_name) {
|
|||
else
|
||||
vector = scm_c_make_vector (n, SCM_EOL);
|
||||
scm_t_hashtable *t = scm_gc_malloc (sizeof (*t), s_hashtable);
|
||||
i = 0;
|
||||
while (i < HASHTABLE_SIZE_N && n > hashtable_size[i])
|
||||
++i;
|
||||
if (i > 0)
|
||||
i = i - 1;
|
||||
t->min_size_index = t->size_index = i;
|
||||
t->n_items = 0;
|
||||
t->lower = 0;
|
||||
t->upper = 9 * hashtable_size[i] / 10;
|
||||
t->upper = 9 * n / 10;
|
||||
t->flags = flags;
|
||||
if (flags)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue