summaryrefslogtreecommitdiff
path: root/libguile/smob.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-09-25 12:29:02 +0200
committerLudovic Courtès <ludo@gnu.org>2009-09-28 23:32:33 +0200
commit3051344be566178999dd8679744e9c3ae9921de4 (patch)
tree3c316766a81d301a836cb4c0ec2096d8e6ff97a6 /libguile/smob.c
parenta16eda7a400bcfda52109ed839f4fb2e24fa72eb (diff)
downloadguile-3051344be566178999dd8679744e9c3ae9921de4.tar.gz
Remove default port/SMOB finalizers.
* libguile/ports.c (scm_port_free0): Remove. (scm_make_port_type): Set `free' to NULL. * libguile/smob.c (scm_make_smob_type): Leave `free' to NULL. (scm_smob_free): Remove. * libguile/smob.h (scm_smob_free): Remove. * libguile/deprecated.c (scm_smob_free): New. * libguile/deprecated.h (scm_smob_free): New declaration.
Diffstat (limited to 'libguile/smob.c')
-rw-r--r--libguile/smob.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/libguile/smob.c b/libguile/smob.c
index 22b90ad64..42a51fdff 100644
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -97,6 +97,7 @@ scm_markcdr (SCM ptr)
return SCM_CELL_OBJECT_1 (ptr);
}
+
/* {Free}
*/
@@ -106,16 +107,7 @@ scm_free0 (SCM ptr SCM_UNUSED)
return 0;
}
-size_t
-scm_smob_free (SCM obj)
-{
- long n = SCM_SMOBNUM (obj);
- if (scm_smobs[n].size > 0)
- scm_gc_free ((void *) SCM_CELL_WORD_1 (obj),
- scm_smobs[n].size, SCM_SMOBNAME (n));
- return 0;
-}
-
+
/* {Print}
*/
@@ -307,11 +299,7 @@ scm_make_smob_type (char const *name, size_t size)
scm_misc_error (FUNC_NAME, "maximum number of smobs exceeded", SCM_EOL);
scm_smobs[new_smob].name = name;
- if (size != 0)
- {
- scm_smobs[new_smob].size = size;
- scm_smobs[new_smob].free = scm_smob_free;
- }
+ scm_smobs[new_smob].size = size;
/* Make a class object if Goops is present. */
if (SCM_UNPACK (scm_smob_class[0]) != 0)