diff options
author | Daniel Llorens <daniel.llorens@bluewin.ch> | 2015-02-25 09:47:40 +0100 |
---|---|---|
committer | Daniel Llorens <daniel.llorens@bluewin.ch> | 2016-11-23 11:49:35 +0100 |
commit | 7b6d854cf1b9e4bc5c85497fc0709210978e5a32 (patch) | |
tree | 4f2364878de26598e832e89f602c84af76063900 /libguile/array-handle.c | |
parent | cd7fee8e657cf21ca5013fd90fd5043105e6a907 (diff) |
Do not use array handles in scm_vector
* libguile/vectors.c (scm_vector): Use SCM_I_VECTOR_WELTS on new vector
instead of generic scm_vector_elements; cf. scm_vector_copy().
(scm_vector_elements): Forward to scm_vector_writable_elements().
(scm_vector_writable_elements): Remove special error message for weak
vector arg.
* libguile/generalized-vectors.c (SCM_VALIDATE_VECTOR_WITH_HANDLE):
Remove unused macro.
* libguile/array-handle.c (scm_array_handle_elements): Forward to
scm_array_handle_writable_elements().
Diffstat (limited to 'libguile/array-handle.c')
-rw-r--r-- | libguile/array-handle.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libguile/array-handle.c b/libguile/array-handle.c index 3595266ff..89277d9d6 100644 --- a/libguile/array-handle.c +++ b/libguile/array-handle.c @@ -320,9 +320,7 @@ scm_array_handle_release (scm_t_array_handle *h) const SCM * scm_array_handle_elements (scm_t_array_handle *h) { - if (h->element_type != SCM_ARRAY_ELEMENT_TYPE_SCM) - scm_wrong_type_arg_msg (NULL, 0, h->array, "non-uniform array"); - return ((const SCM*)h->elements) + h->base; + return scm_array_handle_writable_elements (h); } SCM * |