use the new finalizer helpers
* libguile/foreign.c (scm_set_pointer_finalizer_x) * libguile/ports.c (finalize_port) * libguile/smob.c (scm_i_new_smob, scm_i_new_double_smob) * libguile/struct.c (scm_i_alloc_struct) * libguile/numbers.c (make_bignum): Use the new API.
This commit is contained in:
parent
7b327550e2
commit
75ba64d679
5 changed files with 12 additions and 60 deletions
|
|
@ -546,14 +546,9 @@ static void finalize_port (GC_PTR, GC_PTR);
|
|||
static SCM_C_INLINE_KEYWORD void
|
||||
register_finalizer_for_port (SCM port)
|
||||
{
|
||||
GC_finalization_proc prev_finalizer;
|
||||
GC_PTR prev_finalization_data;
|
||||
|
||||
/* Register a finalizer for PORT so that its iconv CDs get freed and
|
||||
optionally its type's `free' function gets called. */
|
||||
GC_REGISTER_FINALIZER_NO_ORDER (SCM2PTR (port), finalize_port, 0,
|
||||
&prev_finalizer,
|
||||
&prev_finalization_data);
|
||||
scm_i_set_finalizer (SCM2PTR (port), finalize_port, NULL);
|
||||
}
|
||||
|
||||
/* Finalize the object (a port) pointed to by PTR. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue