summaryrefslogtreecommitdiff
path: root/libguile/array-map.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2014-02-08 21:02:48 +0100
committerAndy Wingo <wingo@pobox.com>2014-02-08 21:45:38 +0100
commit7070f12b9dc13f3b204acf2bd68c68b26e764990 (patch)
tree15f27dc40c1f7353372a06602e513024f1baedb2 /libguile/array-map.c
parentd747313100cafb2d2e05c84b146e70df295d0931 (diff)
downloadguile-7070f12b9dc13f3b204acf2bd68c68b26e764990.tar.gz
vref, vset members of scm_t_array_handle
* libguile/array-handle.h (scm_t_array_ref, scm_t_array_set): Rename from scm_i_t_array_ref, scm_i_t_array_set. (scm_t_array_handle): Copy vref and vset from impl to handle. (scm_array_handle_ref, scm_array_handle_set): * libguile/array-map.c (racp, ramap, rafe, rafill, array_index_map_1): * libguile/array-handle.c (scm_array_get_handle): Adapt.
Diffstat (limited to 'libguile/array-map.c')
-rw-r--r--libguile/array-map.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libguile/array-map.c b/libguile/array-map.c
index 245cc1ffa..83f3a9949 100644
--- a/libguile/array-map.c
+++ b/libguile/array-map.c
@@ -336,7 +336,7 @@ rafill (SCM dst, SCM fill)
inc = SCM_I_ARRAY_DIMS (dst)->inc;
for (; n-- > 0; i += inc)
- h.impl->vset (&h, i, fill);
+ h.vset (&h, i, fill);
scm_array_handle_release (&h);
return 1;
@@ -372,7 +372,7 @@ racp (SCM src, SCM dst)
inc_d = SCM_I_ARRAY_DIMS (dst)->inc;
for (; n-- > 0; i_s += inc_s, i_d += inc_d)
- h_d.impl->vset (&h_d, i_d, h_s.impl->vref (&h_s, i_s));
+ h_d.vset (&h_d, i_d, h_s.vref (&h_s, i_s));
scm_array_handle_release (&h_d);
scm_array_handle_release (&h_s);
@@ -674,7 +674,7 @@ ramap (SCM ra0, SCM proc, SCM ras)
i0end = i0 + n*inc0;
if (scm_is_null (ras))
for (; i0 < i0end; i0 += inc0)
- h0.impl->vset (&h0, i0, scm_call_0 (proc));
+ h0.vset (&h0, i0, scm_call_0 (proc));
else
{
SCM ra1 = SCM_CAR (ras);
@@ -687,7 +687,7 @@ ramap (SCM ra0, SCM proc, SCM ras)
ras = SCM_CDR (ras);
if (scm_is_null (ras))
for (; i0 < i0end; i0 += inc0, i1 += inc1)
- h0.impl->vset (&h0, i0, scm_call_1 (proc, h1.impl->vref (&h1, i1)));
+ h0.vset (&h0, i0, scm_call_1 (proc, h1.vref (&h1, i1)));
else
{
ras = scm_vector (ras);
@@ -697,7 +697,7 @@ ramap (SCM ra0, SCM proc, SCM ras)
unsigned long k;
for (k = scm_c_vector_length (ras); k--;)
args = scm_cons (AREF (scm_c_vector_ref (ras, k), i), args);
- h0.impl->vset (&h0, i0, scm_apply_1 (proc, h1.impl->vref (&h1, i1), args));
+ h0.vset (&h0, i0, scm_apply_1 (proc, h1.vref (&h1, i1), args));
}
}
scm_array_handle_release (&h1);
@@ -747,7 +747,7 @@ rafe (SCM ra0, SCM proc, SCM ras)
i0end = i0 + n*inc0;
if (scm_is_null (ras))
for (; i0 < i0end; i0 += inc0)
- scm_call_1 (proc, h0.impl->vref (&h0, i0));
+ scm_call_1 (proc, h0.vref (&h0, i0));
else
{
ras = scm_vector (ras);
@@ -757,7 +757,7 @@ rafe (SCM ra0, SCM proc, SCM ras)
unsigned long k;
for (k = scm_c_vector_length (ras); k--;)
args = scm_cons (AREF (scm_c_vector_ref (ras, k), i), args);
- scm_apply_1 (proc, h0.impl->vref (&h0, i0), args);
+ scm_apply_1 (proc, h0.vref (&h0, i0), args);
}
}
scm_array_handle_release (&h0);
@@ -788,7 +788,7 @@ array_index_map_1 (SCM ra, SCM proc)
v = h.array;
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, p, scm_call_1 (proc, scm_from_ulong (i)));
+ h.vset (&h, p, scm_call_1 (proc, scm_from_ulong (i)));
scm_array_handle_release (&h);
}