mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* Fix vector initialization.
This commit is contained in:
parent
f762051048
commit
a75923bb03
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* vectors.c (scm_make_vector): Fix the initialization order of
|
||||
the vector such that the type cell is initialized last.
|
||||
|
||||
2000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* struct.[ch] (scm_struct_init): Made static. Fixed not to rely
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue