Files
gyehoek-hs/runtime/gyehoek.h
2026-05-16 10:26:20 -06:00

28 lines
489 B
C
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef GYEHOEK_H
#define GYEHOEK_H
#include <stdint.h>
typedef uintptr_t scm_t_bits;
typedef union SCM { struct { scm_t_bits n; } n; } SCM;
#define SCM_UNPACK(x) ((x).n.n)
#define SCM_PACK(x) ((SCM) { { (scm_t_bits) (x) } })
#define SCM_IMP(x) (6 & SCM_UNPACK (x))
#define SCM_NIMP(x) (!SCM_IMP (x))
#define SCM_HEAP_OBJECT_P(x) (SCM_NIMP (x))
#define SCM_FALSE 0b00100
#define SCM_TRUE 0b01100
#define SCM_EOL 0b10100
SCM scm_write (SCM);
#endif /* GYEHOEK_H */