summaryrefslogtreecommitdiff
path: root/libguile/gc.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-01-31 22:58:24 +0100
committerAndy Wingo <wingo@pobox.com>2012-01-31 22:58:24 +0100
commit0aed71aa51e89e714de2392c2a5f44694dca77ea (patch)
tree9c99918b70d24d7cd344fcc22c34e2b7cff1e517 /libguile/gc.h
parent3bf3d735ac743eda1f42627d165dfd86f1178126 (diff)
downloadguile-0aed71aa51e89e714de2392c2a5f44694dca77ea.tar.gz
Revert "add SCM_HEAP_OBJECT_BASE"
This reverts commit 47ed8656db8800f3ad20a40eb2c4e9ef3dc891e3. Conflicts: libguile/foreign.c
Diffstat (limited to 'libguile/gc.h')
-rw-r--r--libguile/gc.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/libguile/gc.h b/libguile/gc.h
index 30d06995e..af00e1ed1 100644
--- a/libguile/gc.h
+++ b/libguile/gc.h
@@ -45,13 +45,12 @@ typedef struct scm_t_cell
* in debug mode. In particular these macros will even work for free cells,
* which should never be encountered by user code. */
-#define SCM_GC_CELL_OBJECT(x, n) (SCM_PACK (SCM_HEAP_OBJECT_BASE (x)[n]))
-#define SCM_GC_CELL_WORD(x, n) (SCM_HEAP_OBJECT_BASE (x)[n])
+#define SCM_GC_CELL_OBJECT(x, n) (((SCM *)SCM2PTR (x)) [n])
+#define SCM_GC_CELL_WORD(x, n) (SCM_UNPACK (SCM_GC_CELL_OBJECT ((x), (n))))
-#define SCM_GC_SET_CELL_OBJECT(x, n, v) \
- (SCM_HEAP_OBJECT_BASE (x)[n] = SCM_UNPACK (v))
+#define SCM_GC_SET_CELL_OBJECT(x, n, v) ((((SCM *)SCM2PTR (x)) [n]) = (v))
#define SCM_GC_SET_CELL_WORD(x, n, v) \
- (SCM_HEAP_OBJECT_BASE (x)[n] = (v))
+ (SCM_GC_SET_CELL_OBJECT ((x), (n), SCM_PACK (v)))
#define SCM_GC_CELL_TYPE(x) (SCM_GC_CELL_OBJECT ((x), 0))
@@ -97,8 +96,7 @@ typedef struct scm_t_cell
#define SCM_SET_CELL_OBJECT_2(x, v) SCM_SET_CELL_OBJECT ((x), 2, (v))
#define SCM_SET_CELL_OBJECT_3(x, v) SCM_SET_CELL_OBJECT ((x), 3, (v))
-#define SCM_CELL_WORD_LOC(x, n) (SCM_VALIDATE_CELL((x), &SCM_GC_CELL_WORD ((x), (n))))
-#define SCM_CELL_OBJECT_LOC(x, n) ((SCM *) SCM_CELL_WORD_LOC (x, n))
+#define SCM_CELL_OBJECT_LOC(x, n) (SCM_VALIDATE_CELL((x), &SCM_GC_CELL_OBJECT ((x), (n))))
#define SCM_CARLOC(x) (SCM_CELL_OBJECT_LOC ((x), 0))
#define SCM_CDRLOC(x) (SCM_CELL_OBJECT_LOC ((x), 1))