mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 23:40:29 +02:00
The collector now has an abstract interface onto the embedder. The embedder has to supply some functionality, such as tracing and forwarding. This is a pretty big change in terms of lines but it's supposed to have no functional or performance change.
20 lines
390 B
C
20 lines
390 B
C
#ifndef GC_EDGE_H
|
|
#define GC_EDGE_H
|
|
|
|
#include "gc-ref.h"
|
|
|
|
struct gc_edge {
|
|
struct gc_ref *dst;
|
|
};
|
|
|
|
static inline struct gc_edge gc_edge(void* addr) {
|
|
return (struct gc_edge){addr};
|
|
}
|
|
static inline struct gc_ref gc_edge_ref(struct gc_edge edge) {
|
|
return *edge.dst;
|
|
}
|
|
static inline void gc_edge_update(struct gc_edge edge, struct gc_ref ref) {
|
|
*edge.dst = ref;
|
|
}
|
|
|
|
#endif // GC_EDGE_H
|