mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
* gc.c (scm_gc_sweep): Call struct free slot.
This commit is contained in:
parent
3f737ec81d
commit
f0cb1733dd
1 changed files with 3 additions and 14 deletions
|
@ -1115,20 +1115,9 @@ scm_gc_sweep ()
|
||||||
|
|
||||||
if ((SCM_CDR (vcell) == 0) || (SCM_CDR (vcell) == 1))
|
if ((SCM_CDR (vcell) == 0) || (SCM_CDR (vcell) == 1))
|
||||||
{
|
{
|
||||||
SCM *p = (SCM *) SCM_GCCDR (scmptr);
|
scm_struct_free_t free
|
||||||
if (((SCM*) vcell)[scm_struct_i_flags]
|
= (scm_struct_free_t) ((SCM*) vcell)[scm_struct_i_free];
|
||||||
& SCM_STRUCTF_LIGHT)
|
m += free ((SCM *) vcell, (SCM *) SCM_GCCDR (scmptr));
|
||||||
{
|
|
||||||
SCM layout = ((SCM*)vcell)[scm_vtable_index_layout];
|
|
||||||
m += (SCM_LENGTH (layout) / 2) * sizeof (SCM);
|
|
||||||
free ((char *) p);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m += p[scm_struct_i_n_words] * sizeof (SCM) + 7;
|
|
||||||
/* I feel like I'm programming in BCPL here... */
|
|
||||||
free ((char *) p[scm_struct_i_ptr]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue