diff options
Diffstat (limited to 'libguile/bytevectors.h')
-rw-r--r-- | libguile/bytevectors.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libguile/bytevectors.h b/libguile/bytevectors.h index a5eeaea0c..af4ac1c34 100644 --- a/libguile/bytevectors.h +++ b/libguile/bytevectors.h @@ -129,6 +129,11 @@ SCM_API SCM scm_utf32_to_string (SCM, SCM); #define SCM_BYTEVECTOR_CONTIGUOUS_P(_bv) \ (SCM_BYTEVECTOR_FLAGS (_bv) >> 8UL) +#define SCM_BYTEVECTOR_TYPE_SIZE(var) \ + (scm_i_array_element_type_sizes[SCM_BYTEVECTOR_ELEMENT_TYPE (var)]/8) +#define SCM_BYTEVECTOR_TYPED_LENGTH(var) \ + (SCM_BYTEVECTOR_LENGTH (var) / SCM_BYTEVECTOR_TYPE_SIZE (var)) + /* Hint that is passed to `scm_gc_malloc ()' and friends. */ #define SCM_GC_BYTEVECTOR "bytevector" |