mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 23:50:47 +02:00
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.
This commit is contained in:
parent
f1fcf88b1f
commit
8190effae2
7 changed files with 66 additions and 65 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue