Remove the distinction between inline/outline storage for bytevectors.
authorLudovic Courtès <ludo@gnu.org>
Sun, 30 Aug 2009 23:07:30 +0000 (01:07 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sun, 30 Aug 2009 23:07:30 +0000 (01:07 +0200)
commit0665b3ffcb7ec5232a51ff632a818a638dfd4054
treec94dabe676d21744f107b83b114832c7d5a158fa
parent807e5a6641b2aa37ce4198a6c13f1aaebd3a5f25
Remove the distinction between inline/outline storage for bytevectors.

* libguile/bytevectors.c (SCM_BYTEVECTOR_INLINE_THRESHOLD,
  SCM_BYTEVECTOR_INLINEABLE_SIZE_P, SCM_BYTEVECTOR_SET_CONTENTS,
  SCM_BYTEVECTOR_SET_INLINE): Remove.
  (SCM_BYTEVECTOR_HEADER_BYTES): New macro.
  (SCM_BYTEVECTOR_SET_ELEMENT_TYPE): Adjust to new flag layout.
  (make_bytevector): Remove content inlining machinery; use
  `scm_gc_malloc_pointerless ()' in all cases; special-case zero-sized
  vu8 buffers.
  (make_bytevector_from_buffer): Simplified.
  (scm_c_shrink_bytevector): New, formerly `scm_i_shrink_bytevector ()'.
  Remove buffer inlining machinery.
  (scm_bootstrap_bytevectors): Use `make_bytevector ()' for
  SCM_NULL_BYTEVECTOR.

* libguile/bytevectors.h (SCM_BYTEVECTOR_HEADER_SIZE): New macro.
  (SCM_BYTEVECTOR_CONTENTS): Adjust to new layout.
  (SCM_SET_BYTEVECTOR_FLAGS): Properly cast F.
  (SCM_F_BYTEVECTOR_INLINE, SCM_BYTEVECTOR_INLINE_P): Remove.
  (SCM_BYTEVECTOR_ELEMENT_TYPE): Adjust.
  (scm_c_shrink_bytevector): Remove macro, make a C function
  declaration.
libguile/bytevectors.c
libguile/bytevectors.h