diff options
author | Daniel Llorens <daniel.llorens@bluewin.ch> | 2013-04-26 13:02:38 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-02-10 21:58:28 +0100 |
commit | b7c8836b715f3dbbf89e3debb76dcf7b5c8d6ec1 (patch) | |
tree | 3450d67acdc1721a756dbb89912521f69918604e /libguile/array-map.c | |
parent | 992904a8cabe66588f0fcc602ae16e59dcde8b12 (diff) | |
download | guile-b7c8836b715f3dbbf89e3debb76dcf7b5c8d6ec1.tar.gz |
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.
Diffstat (limited to 'libguile/array-map.c')
-rw-r--r-- | libguile/array-map.c | 5 |
1 files changed, 4 insertions, 1 deletions
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, |