Remove the distinction between inline/outline storage for stringbufs.
authorLudovic Courtès <ludo@gnu.org>
Tue, 1 Sep 2009 00:02:43 +0000 (02:02 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 1 Sep 2009 00:02:43 +0000 (02:02 +0200)
commitba54a2026beaadb4e7566d4b9e2c9e4c7cd793e6
treed5c43a42089bf820cee78811f06f31d3ed167ec2
parent13a9455669c2a8d1e4ed59cb8736bf23e91eaa55
Remove the distinction between inline/outline storage for stringbufs.

* libguile/strings.c (STRINGBUF_HEADER_SIZE, STRINGBUF_HEADER_BYTES):
  New macros.
  (STRINGBUF_F_INLINE, STRINGBUF_INLINE, STRINGBUF_OUTLINE_CHARS,
  STRINGBUF_OUTLINE_LENGTH, STRINGBUF_INLINE_CHARS,
  STRINGBUF_INLINE_LENGTH, STRINGBUF_MAX_INLINE_LEN): Remove.
  (STRINGBUF_CHARS, STRINGBUF_WIDE_CHARS): Adjust to return a fixed
  location.
  (STRINGBUF_LENGTH): Get the length from word 1.
  (make_stringbuf, make_wide_stringbuf): Adjust to use a contiguous
  memory region.
  (wide_stringbuf): Renamed from `widen_stringbuf'.  Adjust similarly.
  Return the new stringbuf.  Callers updated.
  (narrow_stringbuf): Likewise.
  (scm_sys_string_dump, scm_sys_symbol_dump): Remove `stringbuf-inline'
  pair.

* test-suite/tests/strings.test ("string internals")["null strings are
  inlined", "short Latin-1 encoded strings are inlined", "long Latin-1
  encoded strings are not inlined", "short UCS-4 encoded strings are not
  inlined", "long UCS-4 encoded strings are not inlined"]: Remove.

* test-suite/tests/symbols.test ("symbol internals")["null symbols are
  inlined", "short Latin-1 encoded symbols are inlined", "long Latin-1
  encoded symbols are not inlined", "short UCS-4 encoded symbols are not
  inlined", "long UCS-4 encoded symbols are not inlined"]: Remove.
libguile/strings.c
test-suite/tests/strings.test
test-suite/tests/symbols.test