From 2d9cdf4e81b858e15454e960247fe826368f4b59 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Mon, 5 Jun 2000 12:54:40 +0000 Subject: [PATCH] * Don't assign to SCM_SUBRF, use new SCM_SET_SUBRF macro instead. --- libguile/ChangeLog | 8 ++++++++ libguile/procs.c | 2 +- libguile/procs.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index f7cff9f2e..220f54422 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,11 @@ +2000-06-05 Dirk Herrmann + + * procs.h (SCM_SET_SUBRF): Added. + + * procs.c (scm_make_subr_opt): Don't assign to SCM_SUBRF, use + SCM_SET_SUBRF instead. Thanks to Bernard Urban for the bug + report. + 2000-06-05 Dirk Herrmann * gc.h (SCM_CARLOC, SCM_CDRLOC): Don't take the address of a SCM diff --git a/libguile/procs.c b/libguile/procs.c index 0ad09262b..6a521879d 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -95,7 +95,7 @@ scm_make_subr_opt (const char *name, int type, SCM (*fcn) (), int set) scm_subr_table[entry].properties = SCM_EOL; scm_subr_table[entry].documentation = SCM_BOOL_F; - SCM_SUBRF (z) = fcn; + SCM_SET_SUBRF (z, fcn); SCM_SET_CELL_TYPE (z, (entry << 8) + type); scm_subr_table_size++; diff --git a/libguile/procs.h b/libguile/procs.h index eb0b06dd9..942385d7d 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -72,6 +72,7 @@ typedef struct #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_CCLO_SUBR(x) (SCM_VELTS(x)[0]) -- 2.20.1