Skip to content

Commit b58815c

Browse files
committed
mmtk: fix linking issue with shape.h
1 parent 2df7489 commit b58815c

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

gc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,12 @@ rb_obj_id(VALUE obj)
20932093
return rb_find_object_id(rb_gc_get_objspace(), obj, object_id);
20942094
}
20952095

2096+
bool
2097+
rb_obj_id_p(VALUE obj)
2098+
{
2099+
return rb_shape_obj_has_id(obj);
2100+
}
2101+
20962102
static enum rb_id_table_iterator_result
20972103
cc_table_memsize_i(VALUE ccs_ptr, void *data_ptr)
20982104
{

gc/gc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ size_t rb_obj_memsize_of(VALUE obj);
7272
void rb_gc_prepare_heap_process_object(VALUE obj);
7373
bool ruby_free_at_exit_p(void);
7474
bool rb_memerror_reentered(void);
75+
bool rb_obj_id_p(VALUE);
7576

7677
#if USE_MODULAR_GC
7778
bool rb_gc_event_hook_required_p(rb_event_flag_t event);

gc/mmtk/mmtk.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "gc/gc.h"
99
#include "gc/gc_impl.h"
1010
#include "gc/mmtk/mmtk.h"
11-
#include "shape.h"
1211

1312
#include "ccan/list/list.h"
1413
#include "darray.h"
@@ -1215,7 +1214,7 @@ rb_gc_impl_object_metadata(void *objspace_ptr, VALUE obj)
12151214
n++; \
12161215
} while (0)
12171216

1218-
if (rb_shape_obj_has_id(obj)) SET_ENTRY(object_id, rb_obj_id(obj));
1217+
if (rb_obj_id_p(obj)) SET_ENTRY(object_id, rb_obj_id(obj));
12191218

12201219
object_metadata_entries[n].name = 0;
12211220
object_metadata_entries[n].val = 0;

0 commit comments

Comments
 (0)