diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-06-22 00:51:08 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-06-22 01:09:39 +0200 |
commit | 438974d08dcb96a01fe62ea9b0446b8420e703c4 (patch) | |
tree | 94b75ea2cf4c9d1b4c6fda2dbecaac1b49f9ecf6 /libguile/bytevectors.h | |
parent | 404bb5f87b66709206507acdf7b899101185a7a0 (diff) | |
download | guile-438974d08dcb96a01fe62ea9b0446b8420e703c4.tar.gz |
Make bytevectors accessible using the generalized-vector API.
As a side effect, this allows compilation of literal bytevectors
("#vu8(...)"), which gets done by the generic array handling
of the GLIL->assembly compiler.
* doc/ref/api-compound.texi (Generalized Vectors): Mention bytevectors.
(Arrays, Array Syntax): Likewise.
* doc/ref/api-data.texi (Bytevectors as Generalized Vectors): New node.
* libguile/bytevectors.c (scm_i_bytevector_generalized_set_x): New.
* libguile/bytevectors.h (scm_i_bytevector_generalized_set_x): New
declaration.
* libguile/srfi-4.c (scm_i_generalized_vector_type,
scm_array_handle_uniform_element_size,
scm_array_handle_uniform_writable_elements): Add support for
bytevectors.
* libguile/unif.c (type_creator_table): Add `vu8'.
(bytevector_ref, bytevector_set): New functions.
(memoize_ref, memoize_set): Add support for bytevectors.
* libguile/vectors.c (scm_is_generalized_vector,
scm_c_generalized_vector_length, scm_c_generalized_vector_ref,
scm_c_generalized_vector_set_x): Add support for bytevectors.
* test-suite/tests/bytevectors.test ("Generalized Vectors"): New test
set.
Diffstat (limited to 'libguile/bytevectors.h')
-rw-r--r-- | libguile/bytevectors.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/bytevectors.h b/libguile/bytevectors.h index df1ad2dfe..ccab27522 100644 --- a/libguile/bytevectors.h +++ b/libguile/bytevectors.h @@ -136,6 +136,7 @@ SCM_INTERNAL SCM scm_c_take_bytevector (signed char *, size_t); : scm_i_shrink_bytevector ((_bv), (_len))) SCM_INTERNAL SCM scm_i_shrink_bytevector (SCM, size_t); +SCM_INTERNAL void scm_i_bytevector_generalized_set_x (SCM, size_t, SCM); SCM_INTERNAL SCM scm_null_bytevector; #endif /* SCM_BYTEVECTORS_H */ |