[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 54/86: Simplify SCM_IMMUTABLE_CELL macros
From: |
Andy Wingo |
Subject: |
[Guile-commits] 54/86: Simplify SCM_IMMUTABLE_CELL macros |
Date: |
Wed, 20 Jun 2018 14:09:40 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 092896c6edca418ec503b39b89cbac2211dc8a9c
Author: Andy Wingo <address@hidden>
Date: Wed Jun 20 09:41:26 2018 +0200
Simplify SCM_IMMUTABLE_CELL macros
* libguile/snarf.h (SCM_IMMUTABLE_CELL):
(SCM_IMMUTABLE_DOUBLE_CELL): Simplify these macros and avoid pulling
in gc.h.
---
libguile/snarf.h | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/libguile/snarf.h b/libguile/snarf.h
index 3090148..ff18a3e 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 */
- [Guile-commits] 48/86: Deprecate SCM_STATIC_DOUBLE_CELL snarf macro, (continued)
- [Guile-commits] 48/86: Deprecate SCM_STATIC_DOUBLE_CELL snarf macro, Andy Wingo, 2018/06/20
- [Guile-commits] 51/86: Devolve variable snarfers, Andy Wingo, 2018/06/20
- [Guile-commits] 50/86: Devolve keyword-snarfing macros, Andy Wingo, 2018/06/20
- [Guile-commits] 49/86: Move string-related snarfers to strings.h, Andy Wingo, 2018/06/20
- [Guile-commits] 25/86: Remove list.h from _scm.h, Andy Wingo, 2018/06/20
- [Guile-commits] 26/86: Devolve boolean.h include., Andy Wingo, 2018/06/20
- [Guile-commits] 39/86: Remove <stdio.h> from ports.h, Andy Wingo, 2018/06/20
- [Guile-commits] 55/86: Remove snarf.h from _scm.h, Andy Wingo, 2018/06/20
- [Guile-commits] 52/86: Remove mutex snarfers, Andy Wingo, 2018/06/20
- [Guile-commits] 58/86: Define scm_t_wchar in one place, Andy Wingo, 2018/06/20
- [Guile-commits] 54/86: Simplify SCM_IMMUTABLE_CELL macros,
Andy Wingo <=
- [Guile-commits] 27/86: Devolve pairs.h, Andy Wingo, 2018/06/20
- [Guile-commits] 53/86: Devolve smob snarfers, Andy Wingo, 2018/06/20
- [Guile-commits] 57/86: Shuffle around inline C function implementation, Andy Wingo, 2018/06/20
- [Guile-commits] 62/86: Devolve foreign.h from _scm.h, Andy Wingo, 2018/06/20
- [Guile-commits] 63/86: Devolve programs.h from _scm.h., Andy Wingo, 2018/06/20
- [Guile-commits] 22/86: Devolve more validate macros, Andy Wingo, 2018/06/20
- [Guile-commits] 23/86: Remove includes of validate.h., Andy Wingo, 2018/06/20
- [Guile-commits] 56/86: Devolve variable.h from _scm.h., Andy Wingo, 2018/06/20
- [Guile-commits] 69/86: Move SCM_C_INLINE_KEYWORD definition to inline.h, Andy Wingo, 2018/06/20
- [Guile-commits] 70/86: Fix include in test-ffi-lib, Andy Wingo, 2018/06/20