diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-20 09:41:26 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-20 09:41:26 +0200 |
commit | 092896c6edca418ec503b39b89cbac2211dc8a9c (patch) | |
tree | c8e4e95ce957a2cc29ccc34654801f60482061c7 | |
parent | ad4fbebe85601de4f06eec88899972077a8ceebf (diff) | |
download | guile-092896c6edca418ec503b39b89cbac2211dc8a9c.tar.gz |
Simplify SCM_IMMUTABLE_CELL macros
* libguile/snarf.h (SCM_IMMUTABLE_CELL):
(SCM_IMMUTABLE_DOUBLE_CELL): Simplify these macros and avoid pulling
in gc.h.
-rw-r--r-- | libguile/snarf.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/libguile/snarf.h b/libguile/snarf.h index 309014835..ff18a3ecc 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -25,7 +25,8 @@ -#include <libguile/gc.h> +#include <libguile/__scm.h> +#include <libguile/tags.h> /* Macros for snarfing initialization actions from C source. */ @@ -91,22 +92,14 @@ DOCSTRING ^^ } #ifdef SCM_SUPPORT_STATIC_ALLOCATION #define SCM_IMMUTABLE_CELL(c_name, car, cdr) \ - static SCM_ALIGNED (8) SCM_UNUSED const scm_t_cell \ - c_name ## _raw_scell = \ - { \ - SCM_PACK (car), \ - SCM_PACK (cdr) \ - }; \ - static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw_scell) + static SCM_ALIGNED (8) const SCM c_name ## _raw [2] = \ + { SCM_PACK (car), SCM_PACK (cdr) }; \ + static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw) #define SCM_IMMUTABLE_DOUBLE_CELL(c_name, car, cbr, ccr, cdr) \ - static SCM_ALIGNED (8) SCM_UNUSED const scm_t_cell \ - c_name ## _raw_cell [2] = \ - { \ - { SCM_PACK (car), SCM_PACK (cbr) }, \ - { SCM_PACK (ccr), SCM_PACK (cdr) } \ - }; \ - static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw_cell) + static SCM_ALIGNED (8) const SCM c_name ## _raw [4] = \ + { SCM_PACK (car), SCM_PACK (cbr), SCM_PACK (ccr), SCM_PACK (cdr) }; \ + static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw) #endif /* SCM_SUPPORT_STATIC_ALLOCATION */ |