mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 19:44:10 +02:00
correct use of SCM2PTR in SCM_I_REGISTER_DISAPPEARING_LINK forms
* libguile/hashtab.c (set_weak_cdr): * libguile/vectors.c (scm_c_vector_set_x): * libguile/weaks.c (scm_weak_car_pair, scm_weak_cdr_pair): (scm_doubly_weak_pair): Use SCM2PTR for the target of SCM_I_REGISTER_DISAPPEARING_LINK calls.
This commit is contained in:
parent
393baa8a44
commit
d3464bb6e2
3 changed files with 18 additions and 24 deletions
|
@ -774,14 +774,14 @@ set_weak_cdr (void *data)
|
|||
|
||||
if (SCM_NIMP (SCM_WEAK_PAIR_CDR (d->pair)) && !SCM_NIMP (d->new_val))
|
||||
{
|
||||
GC_unregister_disappearing_link ((void *) SCM_CDRLOC (d->pair));
|
||||
GC_unregister_disappearing_link ((GC_PTR) SCM_CDRLOC (d->pair));
|
||||
SCM_SETCDR (d->pair, d->new_val);
|
||||
}
|
||||
else
|
||||
{
|
||||
SCM_SETCDR (d->pair, d->new_val);
|
||||
SCM_I_REGISTER_DISAPPEARING_LINK ((void *) SCM_CDRLOC (d->pair),
|
||||
SCM2PTR (d->new_val));
|
||||
SCM_I_REGISTER_DISAPPEARING_LINK ((GC_PTR) SCM_CDRLOC (d->pair),
|
||||
(GC_PTR) SCM2PTR (d->new_val));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue