Merge commit 'feccd2d3100fd2964d4c2df58ab3da7ce4949a66' into vm-check
authorAndy Wingo <wingo@oblong.net>
Tue, 17 Mar 2009 15:09:41 +0000 (16:09 +0100)
committerAndy Wingo <wingo@oblong.net>
Tue, 17 Mar 2009 15:09:41 +0000 (16:09 +0100)
libguile/goops.c
libguile/procs.c
libguile/procs.h

index 51b9b42..2fc6c31 100644 (file)
@@ -1905,7 +1905,7 @@ scm_c_extend_primitive_generic (SCM extended, SCM extension)
       gext = scm_call_2 (SCM_VARIABLE_REF (scm_var_make_extended_generic),
                         gf,
                         SCM_SNAME (extension));
-      *SCM_SUBR_GENERIC (extension) = gext;
+      SCM_SET_SUBR_GENERIC (extension, gext);
     }
   else
     {
index 74cb86c..fd7f3aa 100644 (file)
@@ -102,7 +102,7 @@ scm_c_make_subr_with_generic (const char *name,
                              long type, SCM (*fcn) (), SCM *gf)
 {
   SCM subr = scm_c_make_subr (name, type, fcn);
-  SCM_SUBR_GENERIC (subr) = gf;
+  SCM_SET_SUBR_GENERIC_LOC (subr, gf);
   return subr;
 }
 
index 8365abe..6f8d4c2 100644 (file)
@@ -50,6 +50,8 @@ typedef struct
 #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)
+#define SCM_SET_SUBR_GENERIC(x, g) (*SCM_SUBR_ENTRY (x).generic = (g))
+#define SCM_SET_SUBR_GENERIC_LOC(x, g) (SCM_SUBR_ENTRY (x).generic = (g))
 
 #define SCM_CCLO_LENGTH(x) (SCM_CELL_WORD_0 (x) >> 8)
 #define SCM_MAKE_CCLO_TAG(v)  (((v) << 8) + scm_tc7_cclo)