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

Simplify ASET in array-map.c

* libguile/array-map.c: (ASET): this is only ever used with a true vector
  type, so remove use of inc/base/lbnd.
This commit is contained in:
Daniel Llorens 2013-04-24 16:00:06 +02:00 committed by Andy Wingo
parent 1c22510af4
commit aba084e95e

View file

@ -62,12 +62,12 @@ AREF (SCM v, size_t pos)
return ret;
}
/* This is only ever used with v = SCM_I_ARRAY_V () */
static void
ASET (SCM v, size_t pos, SCM val)
{
scm_t_array_handle h;
scm_array_get_handle (v, &h);
pos = h.base + (pos - h.dims[0].lbnd) * h.dims[0].inc;
h.impl->vset (h.array, pos, val);
scm_array_handle_release (&h);
}