From 75ba64d6797f5857cc9885eb753126119a8c8b68 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 19 Feb 2012 12:23:29 +0100 Subject: 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. --- libguile/struct.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'libguile/struct.c') diff --git a/libguile/struct.c b/libguile/struct.c index 2aa5c113a..e5d95fc44 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -443,16 +443,8 @@ scm_i_alloc_struct (scm_t_bits *vtable_data, int n_words) /* vtable_data can be null when making a vtable vtable */ if (vtable_data && vtable_data[scm_vtable_index_instance_finalize]) - { - /* Register a finalizer for the newly created instance. */ - GC_finalization_proc prev_finalizer; - GC_PTR prev_finalizer_data; - GC_REGISTER_FINALIZER_NO_ORDER (SCM2PTR (ret), - struct_finalizer_trampoline, - NULL, - &prev_finalizer, - &prev_finalizer_data); - } + /* Register a finalizer for the newly created instance. */ + scm_i_set_finalizer (SCM2PTR (ret), struct_finalizer_trampoline, NULL); return ret; } -- cgit v1.2.3