summaryrefslogtreecommitdiff
path: root/libguile/bytevectors.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-06-24 23:46:42 +0200
committerAndy Wingo <wingo@pobox.com>2009-06-26 12:42:10 +0200
commitcaa92f5e951528c1ea31b2eea8b388e9888fa19e (patch)
tree0e58d7153194bd7fc33b97e3877e0d3e04d03863 /libguile/bytevectors.h
parent5fa2deb3f715502866775a7e912dc66e3b6571ac (diff)
downloadguile-caa92f5e951528c1ea31b2eea8b388e9888fa19e.tar.gz
bytevectors provide scm_i_native_endianness to the vm
* libguile/bytevectors.h (scm_i_native_endianness): Allow the VM to use scm_i_native_endianness, but still keep it marked as internal. * libguile/bytevectors.c: Adjust to use scm_i_native_endianness instead of native_endianness. Define it at bootstrap time.
Diffstat (limited to 'libguile/bytevectors.h')
-rw-r--r--libguile/bytevectors.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/bytevectors.h b/libguile/bytevectors.h
index 903ce7ae3..cb2726251 100644
--- a/libguile/bytevectors.h
+++ b/libguile/bytevectors.h
@@ -116,6 +116,8 @@ SCM_API SCM scm_utf32_to_string (SCM, SCM);
i.e., without allocating memory beside the SMOB itself (a double cell).
This optimization is necessary since small bytevectors are expected to be
common. */
+#define SCM_BYTEVECTOR_P(_bv) \
+ SCM_SMOB_PREDICATE (scm_tc16_bytevector, _bv)
#define SCM_BYTEVECTOR_INLINE_THRESHOLD (2 * sizeof (SCM))
#define SCM_BYTEVECTOR_INLINEABLE_SIZE_P(_size) \
((_size) <= SCM_BYTEVECTOR_INLINE_THRESHOLD)
@@ -129,6 +131,7 @@ SCM_INTERNAL void scm_bootstrap_bytevectors (void);
SCM_INTERNAL void scm_init_bytevectors (void);
SCM_INTERNAL scm_t_bits scm_tc16_bytevector;
+SCM_INTERNAL SCM scm_i_native_endianness;
SCM_INTERNAL SCM scm_c_take_bytevector (signed char *, size_t);
#define scm_c_shrink_bytevector(_bv, _len) \