diff options
author | Andy Wingo <wingo@pobox.com> | 2009-07-19 15:04:40 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-07-19 15:15:40 +0200 |
commit | 2a610be59412a9d633a373c6f6ec4d4794c40fd8 (patch) | |
tree | eef959741b074fabac5456d1b0c6b9eaa80194f3 /libguile/srfi-4.i.c | |
parent | 2fa901a51f62da8a01112aefbf687530f4bff160 (diff) | |
download | guile-2a610be59412a9d633a373c6f6ec4d4794c40fd8.tar.gz |
add generic array implementation facility
* libguile/array-handle.c (scm_i_register_array_implementation):
(scm_i_array_implementation_for_obj): Add generic array facility,
which will (in a few commits) detangle the array code.
(scm_array_get_handle): Use the generic array facility. Note that
scm_t_array_handle no longer has ref and set function pointers;
instead it has a pointer to the array implementation. It is unlikely
that code out there used these functions, however, as the supported
way was through scm_array_handle_ref/set_x.
(scm_array_handle_pos): Move this function here from arrays.c.
(scm_array_handle_element_type): New function, returns a Scheme value
representing the type of element stored in this array.
* libguile/array-handle.h (scm_t_array_element_type): New enum, for
generically determining the type of an array.
(scm_array_handle_rank):
(scm_array_handle_dims): These are now just #defines.
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/srfi-4.c:
* libguile/strings.c:
* libguile/vectors.c: Register array implementations for all of these.
* libguile/inline.h: Update for array_handle_ref/set change.
* libguile/deprecated.h: Need to include arrays.h now.
Diffstat (limited to 'libguile/srfi-4.i.c')
-rw-r--r-- | libguile/srfi-4.i.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/srfi-4.i.c b/libguile/srfi-4.i.c index 58a52c1d8..84553c804 100644 --- a/libguile/srfi-4.i.c +++ b/libguile/srfi-4.i.c @@ -187,13 +187,13 @@ F(scm_,TAG,vector_writable_elements) (SCM uvec, #endif static SCM -F(,TAG,ref) (scm_t_array_handle *handle, ssize_t pos) +F(,TAG,ref) (scm_t_array_handle *handle, size_t pos) { return uvec_fast_ref (TYPE, handle->elements, pos); } static void -F(,TAG,set) (scm_t_array_handle *handle, ssize_t pos, SCM val) +F(,TAG,set) (scm_t_array_handle *handle, size_t pos, SCM val) { uvec_fast_set_x (TYPE, handle->writable_elements, pos, val); } |