diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-09-15 23:32:11 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-09-15 23:32:11 +0200 |
commit | d3be55145a8c5481d7eb58ec66639645b7ef7f3f (patch) | |
tree | aa26f587db37764562441ac7cb4a9d65a0f4778a /libguile/procs.c | |
parent | 53ea4fdf99878eb603c8f650a09b91f0c92fc6f5 (diff) | |
download | guile-d3be55145a8c5481d7eb58ec66639645b7ef7f3f.tar.gz |
Use immutable cells (aka. libgc "stubborn") for subrs.
* libguile/procs.c (scm_c_make_subr): Use `scm_immutable_cell ()' instead
of `scm_cell ()'.
(scm_free_subr_entry): Remove.
* libguile/procs.h (SCM_SET_SUBRNUM, SCM_SET_SUBRF): Remove.
(scm_free_subr_entry): Remove declaration.
Diffstat (limited to 'libguile/procs.c')
-rw-r--r-- | libguile/procs.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libguile/procs.c b/libguile/procs.c index a1abe11b4..0b4b00e8f 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -64,7 +64,7 @@ scm_c_make_subr (const char *name, long type, SCM (*fcn) ()) } entry = scm_subr_table_size; - z = scm_cell ((entry << 8) + type, (scm_t_bits) fcn); + z = scm_immutable_cell ((entry << 8) + type, (scm_t_bits) fcn); scm_subr_table[entry].handle = z; scm_subr_table[entry].name = scm_from_locale_symbol (name); scm_subr_table[entry].generic = 0; @@ -82,18 +82,6 @@ scm_c_define_subr (const char *name, long type, SCM (*fcn) ()) return subr; } -/* This function isn't currently used since subrs are never freed. */ -/* *fixme* Need mutex here. */ -void -scm_free_subr_entry (SCM subr) -{ - long entry = SCM_SUBRNUM (subr); - /* Move last entry in table to the free position */ - scm_subr_table[entry] = scm_subr_table[scm_subr_table_size - 1]; - SCM_SET_SUBRNUM (scm_subr_table[entry].handle, entry); - scm_subr_table_size--; -} - SCM scm_c_make_subr_with_generic (const char *name, long type, SCM (*fcn) (), SCM *gf) |