summaryrefslogtreecommitdiff
path: root/libguile/unif.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2001-11-25 15:16:34 +0000
committerMarius Vollmer <mvo@zagadka.de>2001-11-25 15:16:34 +0000
commit0b2f15c3ab447f222438ace7df40da31f350876f (patch)
tree07608dbf260b15e35717f2e062c831cec2b9d4d6 /libguile/unif.h
parent0a7b506d24c824d997440387791adaf08eb5535b (diff)
downloadguile-0b2f15c3ab447f222438ace7df40da31f350876f.tar.gz
(SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
Diffstat (limited to 'libguile/unif.h')
-rw-r--r--libguile/unif.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libguile/unif.h b/libguile/unif.h
index b5d393a12..522a630b4 100644
--- a/libguile/unif.h
+++ b/libguile/unif.h
@@ -96,14 +96,16 @@ SCM_API scm_t_bits scm_tc16_array;
#define SCM_SET_UVECTOR_BASE(v, b) (SCM_SET_CELL_WORD_1 ((v), (b)))
#define SCM_UVECTOR_MAX_LENGTH SCM_I_MAX_LENGTH
#define SCM_UVECTOR_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
-#define SCM_SET_UVECTOR_LENGTH(v, l, t) (SCM_SET_CELL_WORD_0 ((v), ((l) << 8) + (t)))
+#define SCM_MAKE_UVECTOR_TAG(l,t) (((l) << 8) + (t))
+#define SCM_SET_UVECTOR_LENGTH(v, l, t) (SCM_SET_CELL_WORD_0 ((v), SCM_MAKE_UVECTOR_TAG(l,t)))
#define SCM_BITVECTOR_P(x) (!SCM_IMP (x) && (SCM_TYP7 (x) == scm_tc7_bvect))
#define SCM_BITVECTOR_BASE(x) ((unsigned long *) (SCM_CELL_WORD_1 (x)))
#define SCM_SET_BITVECTOR_BASE(v, b) (SCM_SET_CELL_WORD_1 ((v), (b)))
#define SCM_BITVECTOR_MAX_LENGTH SCM_I_MAX_LENGTH
#define SCM_BITVECTOR_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
-#define SCM_SET_BITVECTOR_LENGTH(v, l) (SCM_SET_CELL_WORD_0 ((v), ((l) << 8) + scm_tc7_bvect))
+#define SCM_MAKE_BITVECTOR_TAG(l) (((l) << 8) + scm_tc7_bvect)
+#define SCM_SET_BITVECTOR_LENGTH(v, l) (SCM_SET_CELL_WORD_0 ((v), SCM_MAKE_BITVECTOR_TAG (l)))