diff options
-rw-r--r-- | libguile/procs.c | 14 | ||||
-rw-r--r-- | libguile/procs.h | 4 |
2 files changed, 1 insertions, 17 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) diff --git a/libguile/procs.h b/libguile/procs.h index e8d69cb14..9e4b13242 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -41,12 +41,9 @@ typedef struct } scm_t_subr_entry; #define SCM_SUBRNUM(subr) (SCM_CELL_WORD_0 (subr) >> 8) -#define SCM_SET_SUBRNUM(subr, num) \ - SCM_SET_CELL_WORD_0 (subr, (num << 8) + SCM_TYP7 (subr)) #define SCM_SUBR_ENTRY(x) (scm_subr_table[SCM_SUBRNUM (x)]) #define SCM_SNAME(x) (SCM_SUBR_ENTRY (x).name) #define SCM_SUBRF(x) ((SCM (*)()) SCM_CELL_WORD_1 (x)) -#define SCM_SET_SUBRF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) #define SCM_DSUBRF(x) ((double (*)()) SCM_CELL_WORD_1 (x)) #define SCM_SUBR_PROPS(x) (SCM_SUBR_ENTRY (x).properties) #define SCM_SUBR_GENERIC(x) (SCM_SUBR_ENTRY (x).generic) @@ -136,7 +133,6 @@ SCM_API long scm_subr_table_room; -SCM_API void scm_free_subr_entry (SCM subr); SCM_API SCM scm_c_make_subr (const char *name, long type, SCM (*fcn)()); SCM_API SCM scm_c_make_subr_with_generic (const char *name, long type, SCM (*fcn)(), SCM *gf); |