On 4 May 2000, Keisuke Nishida wrote:

> I don't understand why SCM_ALLOW_INTS is called twice in the functions
> scm_make_weak_key_hash_table, scm_make_weak_value_hash_table, and
> scm_make_doubly_weak_hash_table.  Isn't this a bug?
> 
> SCM_DEFINE (scm_make_weak_key_hash_table, "make-weak-key-hash-table", 1, 0, 0, 
>            (SCM k),
> {
>   SCM v;
>   SCM_VALIDATE_INUM (1,k);
>   v = scm_make_weak_vector (k, SCM_EOL);
>   SCM_ALLOW_INTS;
>   SCM_UNPACK (SCM_VELTS (v)[-1]) = 1;
>   SCM_ALLOW_INTS;
>   return v;
> }

An easy fix would simply change the first SCM_ALLOW_INTS to
SCM_DEFER_INTS.  However, I wonder whether the critical section is
necessary at all.

Best regards
Dirk Herrmann

Reply via email to