summaryrefslogtreecommitdiff
path: root/libguile/procs.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-01-20 23:29:09 +0100
committerLudovic Courtès <ludo@gnu.org>2009-01-20 23:50:50 +0100
commit499b5dfa3eff74f525ba07b6c865a970c056a6cb (patch)
tree95a4b0e971ae87db4ec2e770f37266a6a994ca36 /libguile/procs.h
parenta62fad3a22fd2d5bc0d808c60458df6088a0f1f5 (diff)
downloadguile-499b5dfa3eff74f525ba07b6c865a970c056a6cb.tar.gz
Add `SCM_SET_SUBR_GENERIC ()' to replace `SCM_SUBR_GENERIC ()' as an lvalue.
* libguile/goops.c (scm_c_extend_primitive_generic): Use `SCM_SET_SUBR_GENERIC ()' instead of using `SCM_SUBR_GENERIC ()' as an lvalue. * libguile/procs.c (scm_c_make_subr_with_generic): Use `SCM_SET_SUBR_GENERIC_LOC ()'. * libguile/procs.h (SCM_SET_SUBR_GENERIC, SCM_SET_SUBR_GENERIC_LOC): New macros.
Diffstat (limited to 'libguile/procs.h')
-rw-r--r--libguile/procs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/procs.h b/libguile/procs.h
index 122187cb9..c2fc7589a 100644
--- a/libguile/procs.h
+++ b/libguile/procs.h
@@ -47,6 +47,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)