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

* Fix vector initialization.

This commit is contained in:
Dirk Herrmann 2000-07-26 09:20:09 +00:00
parent f762051048
commit a75923bb03
2 changed files with 8 additions and 3 deletions

View file

@ -268,10 +268,10 @@ SCM_DEFINE (scm_make_vector, "make-vector", 1, 1, 0,
SCM_NEWCELL(v);
SCM_DEFER_INTS;
SCM_SETCHARS(v, scm_must_malloc(i?(long)(i*sizeof(SCM)):1L, FUNC_NAME));
SCM_SETLENGTH(v, i, scm_tc7_vector);
velts = SCM_VELTS(v);
j = 0;
while(--i >= j) (velts)[i] = fill;
for (j = 0; j < i; ++j)
velts[j] = fill;
SCM_SETLENGTH(v, i, scm_tc7_vector);
SCM_ALLOW_INTS;
return v;
}