summaryrefslogtreecommitdiff
path: root/libguile/uniform.c
diff options
context:
space:
mode:
authorDaniel Llorens <daniel.llorens@bluewin.ch>2013-04-19 13:43:30 +0200
committerAndy Wingo <wingo@pobox.com>2014-01-27 21:45:54 +0100
commit8190effae22e1ad1086fb0cae429ae42ff6f761d (patch)
tree7e634b863538a22c17454e883c90e30e94cf2e2c /libguile/uniform.c
parentf1fcf88b1f2c7955bda03b5243b904ba16f79b71 (diff)
downloadguile-8190effae22e1ad1086fb0cae429ae42ff6f761d.tar.gz
Have array impl->vref, vset take SCM, not handles
* libguile/array-handle.h - scm_i_t_array_ref, scm_i_t_array_set take SCM. - scm_array_handle_ref, scm_array_handle_set: pass h->array. * libguile/array-map.c - AREF, ASET, rafill, racp, ramap, rafe: pass storage vector SCM instead of handle. * libguile/bitvector.c - bitvector_handle_ref, bitvector_handle_set_x: take bitvector arg. * libguile/bytevectors.c - bv_handle_ref, bv_handle_set_x: take bytevector arg. - scm_i_print_bytevectors: don't use array handles. * libguile/deprecated.c - scm_generalized_vector_to_list: pass h.array. * libguile/strings.c - string_handle_ref, string_handle_set: take string arg. * libguile/uniform.c - scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x: pass h.array. * libguile/vectors.c - vector_handle_ref, vector_handle_set: take vector arg.
Diffstat (limited to 'libguile/uniform.c')
-rw-r--r--libguile/uniform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libguile/uniform.c b/libguile/uniform.c
index e6fcb531a..f12b5eaec 100644
--- a/libguile/uniform.c
+++ b/libguile/uniform.c
@@ -182,8 +182,9 @@ scm_c_uniform_vector_ref (SCM v, size_t pos)
if (!scm_is_uniform_vector (v))
scm_wrong_type_arg_msg (NULL, 0, v, "uniform vector");
+ /* need the handle for bitvectors only */
scm_array_get_handle (v, &h);
- ret = h.impl->vref (&h, pos);
+ ret = h.impl->vref (h.array, pos);
scm_array_handle_release (&h);
return ret;
@@ -207,8 +208,9 @@ scm_c_uniform_vector_set_x (SCM v, size_t pos, SCM val)
if (!scm_is_uniform_vector (v))
scm_wrong_type_arg_msg (NULL, 0, v, "uniform vector");
+ /* need the handle for bitvectors only */
scm_array_get_handle (v, &h);
- h.impl->vset (&h, pos, val);
+ h.impl->vset (h.array, pos, val);
scm_array_handle_release (&h);
}