diff options
author | Ludovic Courtes <ludovic.courtes@laas.fr> | 2006-05-30 21:56:55 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-09-10 20:26:35 +0200 |
commit | 077644c8a4be1e6ed9b325414018d9db95763b4d (patch) | |
tree | 6adbc7d877939ce391f46c6411ef6455680a87f0 /libguile/goops.c | |
parent | 5e67dc27e396e3d4f534e028c8cf06d57f7cd508 (diff) | |
download | guile-077644c8a4be1e6ed9b325414018d9db95763b4d.tar.gz |
Removed unnecessary uses of class destructors.
* libguile/goops.c (scm_sys_inherit_magic_x): Don't invoke
`SCM_SET_CLASS_DESTRUCTOR' for legacy destructors that are no longer
needed (e.g., `scm_struct_free_entity ()', etc.).
* libguile/objects.c (scm_init_objects): Likewise.
git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-34
Diffstat (limited to 'libguile/goops.c')
-rw-r--r-- | libguile/goops.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libguile/goops.c b/libguile/goops.c index 52ce76b72..9b764c191 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -732,9 +732,8 @@ SCM_DEFINE (scm_sys_inherit_magic_x, "%inherit-magic!", 2, 0, 0, ls = SCM_CDR (ls); } flags &= SCM_CLASSF_INHERIT; - if (flags & SCM_CLASSF_ENTITY) - SCM_SET_CLASS_DESTRUCTOR (class, scm_struct_free_entity); - else + + if (! (flags & SCM_CLASSF_ENTITY)) { long n = SCM_I_INUM (SCM_SLOT (class, scm_si_nfields)); #if 0 @@ -751,7 +750,6 @@ SCM_DEFINE (scm_sys_inherit_magic_x, "%inherit-magic!", 2, 0, 0, { /* NOTE: The following depends on scm_struct_i_size. */ flags |= SCM_STRUCTF_LIGHT + n * sizeof (SCM); /* use light representation */ - SCM_SET_CLASS_DESTRUCTOR (class, scm_struct_free_light); } } SCM_SET_CLASS_FLAGS (class, flags); @@ -2790,7 +2788,6 @@ scm_make_class (SCM meta, char *s_name, SCM supers, size_t size, } else if (size > 0) { - SCM_SET_CLASS_DESTRUCTOR (class, scm_struct_free_light); SCM_SET_CLASS_INSTANCE_SIZE (class, size); } |