mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-18 10:10:23 +02:00
Change gc_allocate_ephemeron to return struct gc_ephemeron
This commit is contained in:
parent
db36c48efd
commit
dc013cfb58
5 changed files with 10 additions and 11 deletions
|
@ -2200,14 +2200,14 @@ void* gc_allocate_pointerless(struct gc_mutator *mut, size_t size) {
|
|||
return gc_allocate(mut, size);
|
||||
}
|
||||
|
||||
struct gc_ref gc_allocate_ephemeron(struct gc_mutator *mut) {
|
||||
struct gc_ephemeron* gc_allocate_ephemeron(struct gc_mutator *mut) {
|
||||
struct gc_ref ret =
|
||||
gc_ref_from_heap_object(gc_allocate(mut, gc_ephemeron_size()));
|
||||
if (gc_has_conservative_intraheap_edges()) {
|
||||
uint8_t *metadata = metadata_byte_for_addr(gc_ref_value(ret));
|
||||
*metadata |= METADATA_BYTE_EPHEMERON;
|
||||
}
|
||||
return ret;
|
||||
return gc_ref_heap_object(ret);
|
||||
}
|
||||
|
||||
void gc_ephemeron_init(struct gc_mutator *mut, struct gc_ephemeron *ephemeron,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue