From b7c8836b715f3dbbf89e3debb76dcf7b5c8d6ec1 Mon Sep 17 00:00:00 2001 From: Daniel Llorens Date: Fri, 26 Apr 2013 13:02:38 +0200 Subject: Don't use ASET in scm_array_index_map_x * libguile/array-map.c: (scm_array_index_map_x): replace ASET by direct use of handle->impl. --- libguile/array-map.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguile/array-map.c b/libguile/array-map.c index 3453754d7..7c051a5e4 100644 --- a/libguile/array-map.c +++ b/libguile/array-map.c @@ -704,6 +704,7 @@ array_index_map_1 (SCM ra, SCM proc) static void array_index_map_n (SCM ra, SCM proc) { + scm_t_array_handle h; size_t i; int j, k, kmax = SCM_I_ARRAY_NDIM (ra) - 1; ssize_t *vi; @@ -717,6 +718,7 @@ array_index_map_n (SCM ra, SCM proc) return; } + scm_array_get_handle (ra, &h); k = kmax; do { @@ -735,7 +737,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])) { - ASET (SCM_I_ARRAY_V (ra), i, scm_apply_0 (proc, args)); + h.vset (h.vector, i, scm_apply_0 (proc, args)); i += SCM_I_ARRAY_DIMS (ra)[kmax].inc; } k--; @@ -752,6 +754,7 @@ array_index_map_n (SCM ra, SCM proc) } } while (k >= 0); + scm_array_handle_release (&h); } SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0, -- cgit v1.2.3