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

Allocate inexact numbers in pointer-less memory.

* libguile/numbers.c (scm_from_double): Use `scm_gc_malloc_pointerless'
  instead of `scm_double_cell'.
This commit is contained in:
Ludovic Courtès 2010-10-12 22:00:28 +02:00
parent 796c980a6a
commit 978c52d108

View file

@ -6325,8 +6325,13 @@ scm_to_double (SCM val)
SCM
scm_from_double (double val)
{
SCM z = scm_double_cell (scm_tc16_real, 0, 0, 0);
SCM z;
z = PTR2SCM (scm_gc_malloc_pointerless (sizeof (scm_t_double), "real"));
SCM_SET_CELL_TYPE (z, scm_tc16_real);
SCM_REAL_VALUE (z) = val;
return z;
}