mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-05 01:00:21 +02:00
Add macros-internal.h
* libguile/macros-internal.h: New file. * libguile/Makefile.am (noinst_HEADERS): Add file. * libguile/macros.h: Remove internal definitions. * libguile/init.c: * libguile/macros.c: * libguile/print.c: Use internal file.
This commit is contained in:
parent
db13048459
commit
cce7a04e55
7 changed files with 78 additions and 47 deletions
|
@ -35,40 +35,7 @@
|
|||
#include "threads-internal.h"
|
||||
#include "variable.h"
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
struct scm_syntax_transformer
|
||||
{
|
||||
scm_t_bits tag;
|
||||
scm_t_macro_primitive primitive;
|
||||
SCM name;
|
||||
SCM type;
|
||||
SCM binding;
|
||||
};
|
||||
|
||||
static inline int
|
||||
scm_is_syntax_transformer (SCM x)
|
||||
{
|
||||
return SCM_HAS_TYP16 (x, scm_tc16_syntax_transformer);
|
||||
}
|
||||
|
||||
static inline struct scm_syntax_transformer*
|
||||
scm_to_syntax_transformer (SCM x)
|
||||
{
|
||||
if (!scm_is_syntax_transformer (x))
|
||||
abort ();
|
||||
return (struct scm_syntax_transformer *)SCM_UNPACK_POINTER (x);
|
||||
}
|
||||
|
||||
static inline SCM
|
||||
scm_from_syntax_transformer (struct scm_syntax_transformer *m)
|
||||
{
|
||||
return SCM_PACK_POINTER (m);
|
||||
}
|
||||
|
||||
#define SCM_MACROP(x) scm_is_syntax_transformer (x)
|
||||
#define SCM_VALIDATE_MACRO(p,v) SCM_MAKE_VALIDATE ((p), (v), MACROP)
|
||||
#include "macros-internal.h"
|
||||
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue