mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Simplify SCM_IMMUTABLE_CELL macros
* libguile/snarf.h (SCM_IMMUTABLE_CELL): (SCM_IMMUTABLE_DOUBLE_CELL): Simplify these macros and avoid pulling in gc.h.
This commit is contained in:
parent
ad4fbebe85
commit
092896c6ed
1 changed files with 8 additions and 15 deletions
|
@ -25,7 +25,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <libguile/gc.h>
|
#include <libguile/__scm.h>
|
||||||
|
#include <libguile/tags.h>
|
||||||
|
|
||||||
|
|
||||||
/* Macros for snarfing initialization actions from C source. */
|
/* Macros for snarfing initialization actions from C source. */
|
||||||
|
@ -91,22 +92,14 @@ DOCSTRING ^^ }
|
||||||
#ifdef SCM_SUPPORT_STATIC_ALLOCATION
|
#ifdef SCM_SUPPORT_STATIC_ALLOCATION
|
||||||
|
|
||||||
#define SCM_IMMUTABLE_CELL(c_name, car, cdr) \
|
#define SCM_IMMUTABLE_CELL(c_name, car, cdr) \
|
||||||
static SCM_ALIGNED (8) SCM_UNUSED const scm_t_cell \
|
static SCM_ALIGNED (8) const SCM c_name ## _raw [2] = \
|
||||||
c_name ## _raw_scell = \
|
{ SCM_PACK (car), SCM_PACK (cdr) }; \
|
||||||
{ \
|
static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw)
|
||||||
SCM_PACK (car), \
|
|
||||||
SCM_PACK (cdr) \
|
|
||||||
}; \
|
|
||||||
static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw_scell)
|
|
||||||
|
|
||||||
#define SCM_IMMUTABLE_DOUBLE_CELL(c_name, car, cbr, ccr, cdr) \
|
#define SCM_IMMUTABLE_DOUBLE_CELL(c_name, car, cbr, ccr, cdr) \
|
||||||
static SCM_ALIGNED (8) SCM_UNUSED const scm_t_cell \
|
static SCM_ALIGNED (8) const SCM c_name ## _raw [4] = \
|
||||||
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)
|
||||||
{ 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)
|
|
||||||
#endif /* SCM_SUPPORT_STATIC_ALLOCATION */
|
#endif /* SCM_SUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue