* src/fns.c (make_hash_table): Omit unnecessary assignment to
h->next_weak when the hash table is not weak.
(copy_hash_table): Put the copy next to the original in the
weak_hash_tables list, as this should have better locality
when scanning the weak hash tables.
eassert (XHASH_TABLE (table) == h);
/* Maybe add this hash table to the list of all weak hash tables. */
- if (NILP (h->weak))
- h->next_weak = NULL;
- else
+ if (! NILP (weak))
{
h->next_weak = weak_hash_tables;
weak_hash_tables = h;
/* Maybe add this hash table to the list of all weak hash tables. */
if (!NILP (h2->weak))
{
- h2->next_weak = weak_hash_tables;
- weak_hash_tables = h2;
+ h2->next_weak = h1->next_weak;
+ h1->next_weak = h2;
}
return table;