summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Llorens <daniel.llorens@bluewin.ch>2013-04-29 15:37:52 +0200
committerAndy Wingo <wingo@pobox.com>2014-02-07 15:46:04 +0100
commit9888660409d2a9cf1b762936b6b503c9d4be8d77 (patch)
tree989901c59e8d69d4fb70b5a5c57f9a07eabee92a
parentbfc9277082b55ac6cc52544910bc0bff75ee9eb7 (diff)
downloadguile-9888660409d2a9cf1b762936b6b503c9d4be8d77.tar.gz
Rename scm_t_array_handle.array to .root
Globally rename this field (after shared-array-root), since it's not an array.
-rw-r--r--libguile/array-handle.c4
-rw-r--r--libguile/array-handle.h6
-rw-r--r--libguile/array-map.c4
-rw-r--r--libguile/bitvectors.c6
-rw-r--r--libguile/bytevectors.c2
-rw-r--r--libguile/srfi-4.c6
-rw-r--r--libguile/strings.c2
-rw-r--r--libguile/uniform.c6
-rw-r--r--libguile/vectors.c2
9 files changed, 19 insertions, 19 deletions
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 26ecc0766..80b6b1ec5 100644
--- a/libguile/array-map.c
+++ b/libguile/array-map.c
@@ -693,7 +693,7 @@ array_index_map_1 (SCM ra, SCM proc)
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);
}
@@ -735,7 +735,7 @@ array_index_map_n (SCM ra, SCM proc)
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 ace7c59b4..0b833115b 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -2482,7 +2482,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 1f9f222af..b3c782d2a 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 *
diff --git a/libguile/vectors.c b/libguile/vectors.c
index 61c8ab7dc..d367ca042 100644
--- a/libguile/vectors.c
+++ b/libguile/vectors.c
@@ -446,7 +446,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;