mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
make-weak-key-hash-table vacuuming
* libguile/hashtab.c (scm_make_weak_key_hash_table): Whoops, fix the case I actually cared about.
This commit is contained in:
parent
080a9d4f56
commit
6800f86d63
1 changed files with 9 additions and 3 deletions
|
@ -456,11 +456,17 @@ SCM_DEFINE (scm_make_weak_key_hash_table, "make-weak-key-hash-table", 0, 1, 0,
|
|||
"would modify regular hash tables. (@pxref{Hash Tables})")
|
||||
#define FUNC_NAME s_scm_make_weak_key_hash_table
|
||||
{
|
||||
SCM ret;
|
||||
|
||||
if (SCM_UNBNDP (n))
|
||||
return make_hash_table (SCM_HASHTABLEF_WEAK_CAR, 0, FUNC_NAME);
|
||||
ret = make_hash_table (SCM_HASHTABLEF_WEAK_CAR, 0, FUNC_NAME);
|
||||
else
|
||||
return make_hash_table (SCM_HASHTABLEF_WEAK_CAR,
|
||||
scm_to_ulong (n), FUNC_NAME);
|
||||
ret = make_hash_table (SCM_HASHTABLEF_WEAK_CAR,
|
||||
scm_to_ulong (n), FUNC_NAME);
|
||||
|
||||
scm_c_register_weak_gc_callback (ret, vacuum_weak_hash_table);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue