1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 10:10: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

@ -245,7 +245,7 @@ SCM_DEFINE (scm_srfi1_count, "count", 2, 0, 1,
/* vec is the list arguments */
vec = scm_vector (scm_cons (list1, rest));
len = SCM_SIMPLE_VECTOR_LENGTH (vec);
len = SCM_VECTOR_LENGTH (vec);
/* args is the argument list to pass to pred, same length as vec,
re-used for each call */
@ -259,11 +259,11 @@ SCM_DEFINE (scm_srfi1_count, "count", 2, 0, 1,
i < len;
i++, a = SCM_CDR (a), argnum++)
{
lst = SCM_SIMPLE_VECTOR_REF (vec, i); /* list argument */
lst = SCM_VECTOR_REF (vec, i); /* list argument */
if (! scm_is_pair (lst))
goto check_lst_and_done;
SCM_SETCAR (a, SCM_CAR (lst)); /* arg for pred */
SCM_SIMPLE_VECTOR_SET (vec, i, SCM_CDR (lst)); /* rest of lst */
SCM_VECTOR_SET (vec, i, SCM_CDR (lst)); /* rest of lst */
}
count += scm_is_true (scm_apply_0 (pred, args));