Fix bad uses of base and lbnd on rank 1 arrays
authorDaniel Llorens <daniel.llorens@bluewin.ch>
Thu, 11 Apr 2013 11:03:45 +0000 (13:03 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 7 Feb 2014 09:36:55 +0000 (10:36 +0100)
commit13af75bfe00ff66d18dff31fbf76fadbc3f8c4f4
tree5364f3440f62255334ec9556aa594ae972d73219
parent69843ac1b9dcd2394452c71811438d3b28b5863f
Fix bad uses of base and lbnd on rank 1 arrays

 * libguile/array-map.c
   - rafill, ramap, rafe, racp: object from SCM_I_ARRAY_V always
     has base 0, lbnd 0 and inc 1; make use of this.
 * libguile/arrays.c
   - array_handle_ref, array_handle_set: idem.
   - array_get_handle: sanity check.
 * libguile/generalized-vectors.c
   - scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x:
     pos should be base when idx is lbnd. Furthermore, pos should be signed and
     have its overflow checked; do this by handling the job to
     scm_c_array_ref_1, scm_c_array_set_1_x.
 * libguile/generalized-vectors.h
   - fix prototypes.
libguile/array-map.c
libguile/arrays.c
libguile/generalized-vectors.c
libguile/generalized-vectors.h