mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
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().
This commit is contained in:
parent
cd7fee8e65
commit
7b6d854cf1
3 changed files with 5 additions and 23 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue