ruby-changes:69674
From: Yusuke <ko1@a...>
Date: Wed, 10 Nov 2021 10:08:50 +0900 (JST)
Subject: [ruby-changes:69674] e8086e275b (master): gc.h: move rb_objspace_garbage_object_p to internal/gc.h
https://git.ruby-lang.org/ruby.git/commit/?id=e8086e275b From e8086e275b9a4896ac57dfeac9b22cbc2741d6d1 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Wed, 10 Nov 2021 00:57:03 +0900 Subject: gc.h: move rb_objspace_garbage_object_p to internal/gc.h ... to allow class.c to use the function --- class.c | 1 - gc.h | 1 - internal/gc.h | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/class.c b/class.c index b1bd8969960..f5090d7f0f7 100644 --- a/class.c +++ b/class.c @@ -29,7 +29,6 @@ https://github.com/ruby/ruby/blob/trunk/class.c#L29 #include "internal/variable.h" #include "ruby/st.h" #include "vm_core.h" -#include "gc.h" #define id_attached id__attached__ diff --git a/gc.h b/gc.h index 1ae7733e537..91d6e5787df 100644 --- a/gc.h +++ b/gc.h @@ -127,7 +127,6 @@ void rb_objspace_reachable_objects_from_root(void (func)(const char *category, V https://github.com/ruby/ruby/blob/trunk/gc.h#L127 int rb_objspace_markable_object_p(VALUE obj); int rb_objspace_internal_object_p(VALUE obj); int rb_objspace_marked_object_p(VALUE obj); -int rb_objspace_garbage_object_p(VALUE obj); void rb_objspace_each_objects( int (*callback)(void *start, void *end, size_t stride, void *data), diff --git a/internal/gc.h b/internal/gc.h index 49b12db2dfc..b7b29214cfc 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -99,6 +99,7 @@ VALUE rb_class_allocate_instance(VALUE klass); https://github.com/ruby/ruby/blob/trunk/internal/gc.h#L99 void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache); size_t rb_gc_obj_slot_size(VALUE obj); bool rb_gc_size_allocatable_p(size_t size); +int rb_objspace_garbage_object_p(VALUE obj); RUBY_SYMBOL_EXPORT_BEGIN /* gc.c (export) */ -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/