* libguile/uniform.h:
* libguile/uniform.c (scm_is_uniform_vector, scm_uniform_vector_p)
(scm_c_uniform_vector_length, scm_uniform_vector_length)
(scm_uniform_vector_element_type, scm_uniform_vector_element_size)
(scm_c_uniform_vector_ref, scm_uniform_vector_ref):
(scm_c_uniform_vector_set_x, scm_uniform_vector_set_x):
(scm_uniform_vector_to_list)
(scm_uniform_vector_elements, scm_uniform_vector_writable_elements):
Deprecate. This interface lacked both generality and specificity.
The general replacement is array-length, array-ref, and friends on the
scheme side, or the array handle interface on the C side. On the
specific side of things, there are the specific bytevector, srfi-4,
and bitvector interfaces.
* test-suite/tests/arrays.test:
* test-suite/tests/bitvectors.test:
* test-suite/tests/ports.test:
* test-suite/tests/srfi-4.test: Update to use array interfaces.
* doc/ref/api-foreign.texi (Void Pointers and Byte Access):
* doc/ref/srfi-modules.texi (SRFI-4): Update.
* module/srfi/srfi-4.scm, module/srfi/srfi-4/gnu.scm
(define-bytevector-type): Fix definition of <TAG>vector-length when
applied to uniform vectors of different element sizes. Thanks to
Tobias Brandt <tob.brandt@googlemail.com> for reporting this bug.
* test-suite/tests/srfi-4.test: Add tests.
* libguile/bytevectors.c (COMPLEX_ACCESSOR_PROLOGUE, COMPLEX_NATIVE_REF,
COMPLEX_NATIVE_SET): New macros.
(bytevector_ref_c32, bytevector_ref_c64): Defined in terms of
`COMPLEX_NATIVE_REF'.
(bytevector_set_c32, bytevector_set_c64): Defined in terms of
`COMPLEX_NATIVE_SET'.
(bytevector_ref_fns): Make `static'.
* test-suite/tests/srfi-4.test ("c32 vectors")["generalized-vector-ref",
"generalized-vector-set!", "generalized-vector-ref, out-of-range",
"generalized-vector-set!, out-of-range"]: New tests.
("c64 vectors")["generalized-vector-ref", "generalized-vector-set!",
"generalized-vector-ref, out-of-range",
"generalized-vector-set!, out-of-range"]: New tests.
Reported and fixed by Daniel Llorens <dll@bluewin.ch>.
* libguile/bytevectors.c (VALIDATE_REAL): Test for reals, not rationals.
* test-suite/tests/srfi-4.test (f32 vectors, f64 vectors): Add tests.
* libguile/srfi-4.c (scm_make_srfi_4_vector): When FILL is bound and
non-zero, initialize the last element.
* test-suite/tests/srfi-4.test ("TAG vectors")["make-TAGvector"]: New
tests.
* libguile/generalized-vectors.c (scm_generalized_vector_to_list): Fix
bug iterating over indices of array. Thanks to Tristan Colgate for the
report.
* test-suite/tests/srfi-4.test: Add tests that uniform-vector->list
works for all kinds of uniform vectors.