Bytevectors Section 2.3: "Operations on Integers of Arbitrary Size"
commit7199931407696ed30db372ed2113ccdb5b0c0d45
authorLudovic Court`es <ludovic.courtes@laas.fr>
Thu, 8 Feb 2007 10:03:37 +0000 (8 10:03 +0000)
committerLudovic Court`es <ludovic.courtes@laas.fr>
Thu, 8 Feb 2007 10:03:37 +0000 (8 10:03 +0000)
tree5425e446e8e4111229616cf0221b8919829d1273
parent4c74a91d0a4d71675f3b89b7259f6bc267d1b928
Bytevectors Section 2.3: "Operations on Integers of Arbitrary Size"

* modules/r6rs/bytevector.scm: Export the procedures from Section 2.3.

* src/bytevector.c (is_signed_int8, is_unsigned_int8, is_signed_int16,
  is_unsigned_int16): New macros.
  (bytevector_signed_ref, bytevector_unsigned_ref, bytevector_signed_set,
  bytevector_unsigned_set): New inlines.
  (scm_r6rs_bytevector_uint_ref, scm_r6rs_bytevector_sint_ref,
  scm_r6rs_bytevector_uint_set, scm_r6rs_bytevector_sint_set): Use them.
  (INTEGERS_TO_LIST, INTEGER_LIST_TO_BYTEVECTOR): New macros.
  (scm_r6rs_bytevector_to_uint_list, scm_r6rs_bytevector_to_sint_list,
  scm_r6rs_uint_list_to_bytevector, scm_r6rs_sint_list_to_bytevector):
  New.

* tests/bytevector.test: New tests.

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