bytevector: More integer unaligned accesses fixes.
commit9c9c1cd901853b9b838d61fb09c8bccaabb84340
authorLudovic Court`es <ludovic.courtes@laas.fr>
Fri, 3 Aug 2007 08:52:04 +0000 (3 08:52 +0000)
committerLudovic Court`es <ludovic.courtes@laas.fr>
Fri, 3 Aug 2007 08:52:04 +0000 (3 08:52 +0000)
tree4cf5f9aaecb2d93709978ce06a0ceedbc7e86b1a
parent626683d53e8c4d5ae5d7e69a44f6c5dfa0768b99
bytevector: More integer unaligned accesses fixes.

* src/bytevector.c (INTEGER_REF): Use `memcpy ()' instead of raw
  dereferences, to avoid unaligned accesses and bus errors.
  (INTEGER_NATIVE_REF): Likewise.
  (INTEGER_SET): Likewise.
  (INTEGER_NATIVE_SET): Likewise.

* tests/bytevector.test (2.4 Operations on 16-Bit
  Integers)[bytevector-s16-ref [unaligned]]: New.
  [bytevector-s16-{ref,set!} [unaligned]]: New.

git-archimport-id: lcourtes@laas.fr--2006-libre/guile-r6rs-libs--devo--0--patch-37
ChangeLog
src/bytevector.c
tests/bytevector.test