mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-27 21:40:34 +02:00
More typesafety, more gc_ref
This commit is contained in:
parent
92b8f1e917
commit
6ecf226570
10 changed files with 90 additions and 114 deletions
|
@ -7,14 +7,14 @@
|
|||
static inline void*
|
||||
gc_allocate_with_kind(struct gc_mutator *mut, enum alloc_kind kind, size_t bytes) {
|
||||
void *obj = gc_allocate(mut, bytes);
|
||||
*tag_word(obj) = tag_live(kind);
|
||||
*tag_word(gc_ref_from_heap_object(obj)) = tag_live(kind);
|
||||
return obj;
|
||||
}
|
||||
|
||||
static inline void*
|
||||
gc_allocate_pointerless_with_kind(struct gc_mutator *mut, enum alloc_kind kind, size_t bytes) {
|
||||
void *obj = gc_allocate_pointerless(mut, bytes);
|
||||
*tag_word(obj) = tag_live(kind);
|
||||
*tag_word(gc_ref_from_heap_object(obj)) = tag_live(kind);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue