1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-13 09:10:26 +02:00

Separate compilation!!!!!

This commit is contained in:
Andy Wingo 2022-08-16 17:54:15 +02:00
parent fe9bdf6397
commit b082f5f50d
28 changed files with 344 additions and 189 deletions

21
precise-roots-api.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef PRECISE_ROOTS_API_H
#define PRECISE_ROOTS_API_H
#include "precise-roots-types.h"
#define HANDLE_TO(T) union { T* v; struct handle handle; }
#define HANDLE_REF(h) h.v
#define HANDLE_SET(h,val) do { h.v = val; } while (0)
#define PUSH_HANDLE(cx, h) push_handle(&(cx)->roots.roots, &h.handle)
#define POP_HANDLE(cx) pop_handle(&(cx)->roots.roots)
static inline void push_handle(struct handle **roots, struct handle *handle) {
handle->next = *roots;
*roots = handle;
}
static inline void pop_handle(struct handle **roots) {
*roots = (*roots)->next;
}
#endif // PRECISE_ROOTS_API_H