diff --git a/libguile/array-handle.c b/libguile/array-handle.c index e914456a0..76502e70a 100644 --- a/libguile/array-handle.c +++ b/libguile/array-handle.c @@ -167,7 +167,7 @@ const SCM * scm_array_handle_elements (scm_t_array_handle *h) { if (h->element_type != SCM_ARRAY_ELEMENT_TYPE_SCM) - scm_wrong_type_arg_msg (NULL, 0, h->array, "non-uniform array"); + scm_wrong_type_arg_msg (NULL, 0, h->root, "non-uniform array"); return ((const SCM*)h->elements) + h->base; } @@ -175,7 +175,7 @@ SCM * scm_array_handle_writable_elements (scm_t_array_handle *h) { if (h->element_type != SCM_ARRAY_ELEMENT_TYPE_SCM) - scm_wrong_type_arg_msg (NULL, 0, h->array, "non-uniform array"); + scm_wrong_type_arg_msg (NULL, 0, h->root, "non-uniform array"); return ((SCM*)h->elements) + h->base; } diff --git a/libguile/array-handle.h b/libguile/array-handle.h index 94f368977..ac54825d6 100644 --- a/libguile/array-handle.h +++ b/libguile/array-handle.h @@ -92,7 +92,7 @@ SCM_INTERNAL SCM scm_i_array_element_types[]; typedef struct scm_t_array_handle { - SCM array; + SCM root; scm_t_array_implementation *impl; /* `Base' is an offset into elements or writable_elements, corresponding to the first element in the array. It would be nicer just to adjust the @@ -135,7 +135,7 @@ scm_array_handle_ref (scm_t_array_handle *h, ssize_t p) /* catch overflow */ scm_out_of_range (NULL, scm_from_ssize_t (p)); /* perhaps should catch overflow here too */ - return h->impl->vref (h->array, h->base + p); + return h->impl->vref (h->root, h->base + p); } SCM_INLINE_IMPLEMENTATION void @@ -145,7 +145,7 @@ scm_array_handle_set (scm_t_array_handle *h, ssize_t p, SCM v) /* catch overflow */ scm_out_of_range (NULL, scm_from_ssize_t (p)); /* perhaps should catch overflow here too */ - h->impl->vset (h->array, h->base + p, v); + h->impl->vset (h->root, h->base + p, v); } #endif diff --git a/libguile/array-map.c b/libguile/array-map.c index b18824384..6af1539e9 100644 --- a/libguile/array-map.c +++ b/libguile/array-map.c @@ -55,7 +55,7 @@ AREF (SCM v, size_t pos) scm_t_array_handle h; SCM ret; scm_array_get_handle (v, &h); - ret = h.impl->vref (h.array, h.base + pos * h.dims[0].inc); + ret = h.impl->vref (h.root, h.base + pos * h.dims[0].inc); scm_array_handle_release (&h); return ret; } @@ -66,7 +66,7 @@ ASET (SCM v, size_t pos, SCM val) { scm_t_array_handle h; scm_array_get_handle (v, &h); - h.impl->vset (h.array, pos, val); + h.impl->vset (h.root, pos, val); scm_array_handle_release (&h); } @@ -728,7 +728,7 @@ SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0, scm_array_get_handle (ra, &h); inc = h.dims[0].inc; for (i = h.dims[0].lbnd, p = h.base; i <= h.dims[0].ubnd; ++i, p += inc) - h.impl->vset (h.array, p, scm_call_1 (proc, scm_from_ssize_t (i))); + h.impl->vset (h.root, p, scm_call_1 (proc, scm_from_ssize_t (i))); scm_array_handle_release (&h); } else @@ -768,7 +768,7 @@ SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0, for (; vi[kmax] <= SCM_I_ARRAY_DIMS (ra)[kmax].ubnd; *q = scm_from_ssize_t (++vi[kmax])) { - h.impl->vset (h.array, i, scm_apply_0 (proc, args)); + h.impl->vset (h.root, i, scm_apply_0 (proc, args)); i += SCM_I_ARRAY_DIMS (ra)[kmax].inc; } k--; diff --git a/libguile/bitvectors.c b/libguile/bitvectors.c index 9817e90ab..dd4a12e3f 100644 --- a/libguile/bitvectors.c +++ b/libguile/bitvectors.c @@ -165,12 +165,12 @@ scm_array_handle_bit_elements (scm_t_array_handle *h) scm_t_uint32 * scm_array_handle_bit_writable_elements (scm_t_array_handle *h) { - SCM vec = h->array; + SCM vec = h->root; if (SCM_I_ARRAYP (vec)) vec = SCM_I_ARRAY_V (vec); if (IS_BITVECTOR (vec)) return BITVECTOR_BITS (vec) + h->base/32; - scm_wrong_type_arg_msg (NULL, 0, h->array, "bit array"); + scm_wrong_type_arg_msg (NULL, 0, h->root, "bit array"); } size_t @@ -869,7 +869,7 @@ static void bitvector_get_handle (SCM bv, scm_t_array_handle *h) { h->base = 0; - h->array = bv; + h->root = bv; h->ndims = 1; h->dims = &h->dim0; h->dim0.lbnd = 0; diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index ccb438cea..3fde042a7 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -2204,7 +2204,7 @@ static void bytevector_get_handle (SCM v, scm_t_array_handle *h) { h->base = 0; - h->array = v; + h->root = v; h->ndims = 1; h->dims = &h->dim0; h->dim0.lbnd = 0; diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c index c98681b18..21574c7f0 100644 --- a/libguile/srfi-4.c +++ b/libguile/srfi-4.c @@ -118,13 +118,13 @@ const ctype* scm_array_handle_##tag##_elements (scm_t_array_handle *h) \ { \ if (h->element_type != ETYPE (TAG)) \ - scm_wrong_type_arg_msg (NULL, 0, h->array, #tag "vector"); \ + scm_wrong_type_arg_msg (NULL, 0, h->root, #tag "vector"); \ return ((const ctype*) h->elements) + h->base*width; \ } \ ctype* scm_array_handle_##tag##_writable_elements (scm_t_array_handle *h) \ { \ if (h->element_type != ETYPE (TAG)) \ - scm_wrong_type_arg_msg (NULL, 0, h->array, #tag "vector"); \ + scm_wrong_type_arg_msg (NULL, 0, h->root, #tag "vector"); \ return ((ctype*) h->writable_elements) + h->base*width; \ } \ const ctype *scm_##tag##vector_elements (SCM uvec, \ @@ -142,7 +142,7 @@ return ((ctype*)h->writable_elements) + h->base*width; \ /* otherwise... */ \ else \ - scm_wrong_type_arg_msg (NULL, 0, h->array, #tag "vector"); \ + scm_wrong_type_arg_msg (NULL, 0, h->root, #tag "vector"); \ } diff --git a/libguile/strings.c b/libguile/strings.c index 9ca1d3333..5adebb198 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -2477,7 +2477,7 @@ static void string_get_handle (SCM v, scm_t_array_handle *h) { h->base = 0; - h->array = v; + h->root = v; h->ndims = 1; h->dims = &h->dim0; h->dim0.lbnd = 0; diff --git a/libguile/uniform.c b/libguile/uniform.c index f12b5eaec..97471e78a 100644 --- a/libguile/uniform.c +++ b/libguile/uniform.c @@ -49,9 +49,9 @@ scm_array_handle_uniform_element_size (scm_t_array_handle *h) if (ret && ret % 8 == 0) return ret / 8; else if (ret) - scm_wrong_type_arg_msg (NULL, 0, h->array, "byte-aligned uniform array"); + scm_wrong_type_arg_msg (NULL, 0, h->root, "byte-aligned uniform array"); else - scm_wrong_type_arg_msg (NULL, 0, h->array, "uniform array"); + scm_wrong_type_arg_msg (NULL, 0, h->root, "uniform array"); } size_t @@ -61,7 +61,7 @@ scm_array_handle_uniform_element_bit_size (scm_t_array_handle *h) if (ret) return ret; else - scm_wrong_type_arg_msg (NULL, 0, h->array, "uniform array"); + scm_wrong_type_arg_msg (NULL, 0, h->root, "uniform array"); } const void * @@ -184,7 +184,7 @@ scm_c_uniform_vector_ref (SCM v, size_t pos) /* need the handle for bitvectors only */ scm_array_get_handle (v, &h); - ret = h.impl->vref (h.array, pos); + ret = h.impl->vref (h.root, pos); scm_array_handle_release (&h); return ret; @@ -210,7 +210,7 @@ scm_c_uniform_vector_set_x (SCM v, size_t pos, SCM val) /* need the handle for bitvectors only */ scm_array_get_handle (v, &h); - h.impl->vset (h.array, pos, val); + h.impl->vset (h.root, pos, val); scm_array_handle_release (&h); } diff --git a/libguile/vectors.c b/libguile/vectors.c index 08fac3bbd..40bd9af55 100644 --- a/libguile/vectors.c +++ b/libguile/vectors.c @@ -451,7 +451,7 @@ static void vector_get_handle (SCM v, scm_t_array_handle *h) { h->base = 0; - h->array = v; + h->root = v; h->ndims = 1; h->dims = &h->dim0; h->dim0.lbnd = 0;