diff options
author | Andy Wingo <wingo@pobox.com> | 2018-04-10 19:54:58 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-04-10 20:01:52 +0200 |
commit | 41689edfc31dd7e0438d776754d550311a878ce5 (patch) | |
tree | b29857c08a1f32d83ee7857c7534c73d91685708 /libguile/numbers.h | |
parent | b9f7621e132873f9aa2dc198e1f428f959ce93ab (diff) | |
download | guile-41689edfc31dd7e0438d776754d550311a878ce5.tar.gz |
Slim heap-allocated flonums
* libguile/numbers.h (struct scm_t_double, struct scm_t_complex): Avoid
adding an extra padding word on systems with 8-byte pointers.
* module/system/base/types.scm (cell->object): Update to compute correct
offset of embedded double.
Diffstat (limited to 'libguile/numbers.h')
-rw-r--r-- | libguile/numbers.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libguile/numbers.h b/libguile/numbers.h index 83bcc9ea7..c07082eb1 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -4,7 +4,7 @@ #define SCM_NUMBERS_H /* Copyright (C) 1995, 1996, 1998, 2000-2006, 2008-2011, 2013, 2014, - * 2016, 2017 Free Software Foundation, Inc. + * 2016-2018 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 License @@ -172,14 +172,18 @@ typedef long scm_t_inum; typedef struct scm_t_double { SCM type; +#if SCM_SIZEOF_UINTPTR_T != 8 SCM pad; +#endif double real; } scm_t_double; typedef struct scm_t_complex { SCM type; +#if SCM_SIZEOF_UINTPTR_T != 8 SCM pad; +#endif double real; double imag; } scm_t_complex; |