mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
(scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
convert args the same way that array-set! does.
This commit is contained in:
parent
8418f0c740
commit
ac3c6ad6cf
1 changed files with 3 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1996,1998,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996,1998,2000,2001,2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -564,8 +564,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore SCM_UNUSED)
|
|||
case scm_tc7_fvect:
|
||||
{ /* scope */
|
||||
float f, *ve = (float *) SCM_VELTS (ra);
|
||||
SCM_ASRTGO (SCM_REALP (fill), badarg2);
|
||||
f = SCM_REAL_VALUE (fill);
|
||||
f = (float) scm_num2dbl (fill, FUNC_NAME);
|
||||
for (i = base; n--; i += inc)
|
||||
ve[i] = f;
|
||||
break;
|
||||
|
@ -573,8 +572,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore SCM_UNUSED)
|
|||
case scm_tc7_dvect:
|
||||
{ /* scope */
|
||||
double f, *ve = (double *) SCM_VELTS (ra);
|
||||
SCM_ASRTGO (SCM_REALP (fill), badarg2);
|
||||
f = SCM_REAL_VALUE (fill);
|
||||
f = scm_num2dbl (fill, FUNC_NAME);
|
||||
for (i = base; n--; i += inc)
|
||||
ve[i] = f;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue