1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 02:30:23 +02:00

Simple vectors are just vectors

* doc/ref/api-data.texi: Remove references to 'simple vectors'.
* libguile/vectors.h (SCM_VECTOR_REF,SCM_VECTOR_SET, SCM_VECTOR_LENGHT):
  Renamed from SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
  SCM_SIMPLE_VECTOR_LENGTH.
  (scm_is_simple_vector): Remove.

Elsewhere fix uses of SCM_SIMPLE_VECTOR_xxx or scm_is_simple_vector.
This commit is contained in:
Daniel Llorens 2020-02-03 14:30:26 +01:00
parent 6c97c8108e
commit 40dbe69be5
27 changed files with 305 additions and 291 deletions

View file

@ -43,7 +43,6 @@ SCM_API SCM scm_vector_move_right_x (SCM vec1, SCM start1, SCM end1,
SCM_API SCM scm_vector_copy (SCM vec);
SCM_API int scm_is_vector (SCM obj);
SCM_API int scm_is_simple_vector (SCM obj);
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);
@ -65,11 +64,11 @@ SCM_API SCM *scm_vector_writable_elements (SCM vec,
SCM_ASSERT (scm_is_vector (v) && len == scm_c_vector_length (v), v, pos, FUNC_NAME); \
} while (0)
/* Fast, non-checking accessors for simple vectors.
/* Fast, non-checking accessors.
*/
#define SCM_SIMPLE_VECTOR_LENGTH(x) SCM_I_VECTOR_LENGTH(x)
#define SCM_SIMPLE_VECTOR_REF(x,idx) ((SCM_I_VECTOR_ELTS(x))[idx])
#define SCM_SIMPLE_VECTOR_SET(x,idx,val) ((SCM_I_VECTOR_WELTS(x))[idx]=(val))
#define SCM_VECTOR_LENGTH(x) SCM_I_VECTOR_LENGTH(x)
#define SCM_VECTOR_REF(x,idx) ((SCM_I_VECTOR_ELTS(x))[idx])
#define SCM_VECTOR_SET(x,idx,val) ((SCM_I_VECTOR_WELTS(x))[idx]=(val))
/* Internals */