1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Don't use scm_generalized_vector_get_handle() in array-map.c

* libguile/array-map.c: (rafill, racp, ramap, rafe): use
  scm_array_get_handle() instead of scm_generalized_get_vector_handle().

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Daniel Llorens 2013-04-07 00:04:35 +02:00 committed by Ludovic Courtès
parent a71e79c3e5
commit 48ffc52cc9

View file

@ -325,7 +325,7 @@ rafill (SCM dst, SCM fill)
scm_t_array_handle h;
size_t i;
ssize_t inc;
scm_generalized_vector_get_handle (SCM_I_ARRAY_V (dst), &h);
scm_array_get_handle (SCM_I_ARRAY_V (dst), &h);
i = h.base + h.dims[0].lbnd + SCM_I_ARRAY_BASE (dst)*h.dims[0].inc;
inc = SCM_I_ARRAY_DIMS (dst)->inc * h.dims[0].inc;
@ -357,8 +357,8 @@ racp (SCM src, SCM dst)
ssize_t inc_s, inc_d;
dst = SCM_CAR (dst);
scm_generalized_vector_get_handle (SCM_I_ARRAY_V (src), &h_s);
scm_generalized_vector_get_handle (SCM_I_ARRAY_V (dst), &h_d);
scm_array_get_handle (SCM_I_ARRAY_V (src), &h_s);
scm_array_get_handle (SCM_I_ARRAY_V (dst), &h_d);
i_s = h_s.base + h_s.dims[0].lbnd + SCM_I_ARRAY_BASE (src) * h_s.dims[0].inc;
i_d = h_d.base + h_d.dims[0].lbnd + SCM_I_ARRAY_BASE (dst) * h_d.dims[0].inc;
@ -665,7 +665,7 @@ ramap (SCM ra0, SCM proc, SCM ras)
scm_t_array_handle h0;
size_t i0, i0end;
ssize_t inc0;
scm_generalized_vector_get_handle (SCM_I_ARRAY_V (ra0), &h0);
scm_array_get_handle (SCM_I_ARRAY_V (ra0), &h0);
i0 = h0.base + h0.dims[0].lbnd + SCM_I_ARRAY_BASE (ra0)*h0.dims[0].inc;
inc0 = SCM_I_ARRAY_DIMS (ra0)->inc * h0.dims[0].inc;
i0end = i0 + n*inc0;
@ -678,7 +678,7 @@ ramap (SCM ra0, SCM proc, SCM ras)
scm_t_array_handle h1;
size_t i1;
ssize_t inc1;
scm_generalized_vector_get_handle (SCM_I_ARRAY_V (ra1), &h1);
scm_array_get_handle (SCM_I_ARRAY_V (ra1), &h1);
i1 = h1.base + h1.dims[0].lbnd + SCM_I_ARRAY_BASE (ra1)*h1.dims[0].inc;
inc1 = SCM_I_ARRAY_DIMS (ra1)->inc * h1.dims[0].inc;
ras = SCM_CDR (ras);
@ -738,7 +738,7 @@ rafe (SCM ra0, SCM proc, SCM ras)
scm_t_array_handle h0;
size_t i0, i0end;
ssize_t inc0;
scm_generalized_vector_get_handle (SCM_I_ARRAY_V (ra0), &h0);
scm_array_get_handle (SCM_I_ARRAY_V (ra0), &h0);
i0 = h0.base + h0.dims[0].lbnd + SCM_I_ARRAY_BASE (ra0)*h0.dims[0].inc;
inc0 = SCM_I_ARRAY_DIMS (ra0)->inc * h0.dims[0].inc;
i0end = i0 + n*inc0;