1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-03 08:10:31 +02:00

Use underlying vector implementation directly in array handles

* libguile/array-handle.c
  - scm_array_get_handle: if the object is an array, point impl to
    the underlying vector instead of array impl, then fix the axes. Avoid
    calling scm_i_array_implementation_for_obj twice.
* libguile/arrays.c
  - array_handle_ref, array_handle_set, array_get_handle: remove.
* libguile/bitvectors.c, libguile/bytevectors.c, libguile/strings.c,
  libguile/vectors.c: fix base = 0 in the array handle.
* libguile/vectors.c: (vector_handle_set, vector_handle_ref): do not
  use h->dims.
This commit is contained in:
Daniel Llorens 2013-04-12 17:50:09 +02:00 committed by Andy Wingo
parent ba7e018b61
commit a70333d296
6 changed files with 33 additions and 61 deletions

View file

@ -2475,6 +2475,7 @@ string_handle_set (scm_t_array_handle *h, size_t index, SCM val)
static void
string_get_handle (SCM v, scm_t_array_handle *h)
{
h->base = 0;
h->array = v;
h->ndims = 1;
h->dims = &h->dim0;