mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +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:
parent
796c980a6a
commit
978c52d108
1 changed files with 6 additions and 1 deletions
|
@ -6325,8 +6325,13 @@ scm_to_double (SCM val)
|
||||||
SCM
|
SCM
|
||||||
scm_from_double (double val)
|
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;
|
SCM_REAL_VALUE (z) = val;
|
||||||
|
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue