* Don't assign to SCM_SUBRF, use new SCM_SET_SUBRF macro instead.
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Mon, 5 Jun 2000 12:54:40 +0000 (12:54 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Mon, 5 Jun 2000 12:54:40 +0000 (12:54 +0000)
libguile/ChangeLog
libguile/procs.c
libguile/procs.h

index f7cff9f..220f544 100644 (file)
@@ -1,3 +1,11 @@
+2000-06-05  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * 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  <D.Herrmann@tu-bs.de>
 
        * gc.h (SCM_CARLOC, SCM_CDRLOC):  Don't take the address of a SCM
index 0ad0926..6a52187 100644 (file)
@@ -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++;
   
index eb0b06d..942385d 100644 (file)
@@ -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])