1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

(scm_make_real): prevent reordering of statements

num2float.i.c (FLOAT2NUM): idem
This commit is contained in:
Han-Wen Nienhuys 2002-08-28 22:50:32 +00:00
parent 7200a36b83
commit 8fa5786d7c
3 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,7 @@
2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* numbers.c (scm_make_real): prevent reordering of statements
num2float.i.c (FLOAT2NUM): idem
2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>

View file

@ -33,6 +33,10 @@ FLOAT2NUM (FTYPE n)
{
SCM z;
z = scm_double_cell (scm_tc16_real, 0, 0, 0);
/*
See scm_make_real().
*/
scm_remember_upto_here_1 (z);
SCM_REAL_VALUE (z) = n;
return z;
}

View file

@ -3021,7 +3021,7 @@ scm_make_real (double x)
OK to interchange the initialization above and the one below. We
don't want that, of course.
*/
scm_remember_1 (z);
scm_remember_upto_here_1 (z);
SCM_REAL_VALUE (z) = x;
return z;
}