mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-20 02:30:23 +02:00
Simplify interfaces to scm_vector_elements and scm_vector_writable_elements
* vectors.h: As stated. Don't include array-handle.h. * vectors.c (scm_vector_elements, scm_vector_writable_elements): Reimplement. (vector-move-right!, vector-move-left!): Replace uses of scm_vector_elements and scm_vector_writable_elements on array types. * doc/ref/api-data.texi: Fix doc for scm_vector_elements and scm_vector_writable_elements. * libguile/sort.c (stable-sort!): Fix use of scm_vector_writable_elements.
This commit is contained in:
parent
40dbe69be5
commit
eb2d2c1a41
5 changed files with 139 additions and 124 deletions
|
@ -22,9 +22,9 @@
|
|||
|
||||
|
||||
|
||||
#include "libguile/array-handle.h"
|
||||
#include <libguile/error.h>
|
||||
#include "libguile/gc.h"
|
||||
#include "numbers.h"
|
||||
|
||||
|
||||
|
||||
|
@ -47,12 +47,8 @@ SCM_API SCM scm_c_make_vector (size_t len, SCM fill);
|
|||
SCM_API size_t scm_c_vector_length (SCM vec);
|
||||
SCM_API SCM scm_c_vector_ref (SCM vec, size_t k);
|
||||
SCM_API void scm_c_vector_set_x (SCM vec, size_t k, SCM obj);
|
||||
SCM_API const SCM *scm_vector_elements (SCM vec,
|
||||
scm_t_array_handle *h,
|
||||
size_t *lenp, ssize_t *incp);
|
||||
SCM_API SCM *scm_vector_writable_elements (SCM vec,
|
||||
scm_t_array_handle *h,
|
||||
size_t *lenp, ssize_t *incp);
|
||||
SCM_API const SCM *scm_vector_elements (SCM vec);
|
||||
SCM_API SCM *scm_vector_writable_elements (SCM vec);
|
||||
|
||||
#define SCM_VALIDATE_VECTOR(pos, v) \
|
||||
do { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue