mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Merge 39077459fd
into d025bc230c
This commit is contained in:
commit
ac2db0a49c
1 changed files with 4 additions and 11 deletions
15
iseq.c
15
iseq.c
|
@ -1497,9 +1497,9 @@ rb_iseq_remove_coverage_all(void)
|
||||||
/* define wrapper class methods (RubyVM::InstructionSequence) */
|
/* define wrapper class methods (RubyVM::InstructionSequence) */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
iseqw_mark(void *ptr)
|
iseqw_mark_and_move(void *ptr)
|
||||||
{
|
{
|
||||||
rb_gc_mark_movable(*(VALUE *)ptr);
|
rb_gc_mark_and_move((VALUE *)ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
|
@ -1508,20 +1508,13 @@ iseqw_memsize(const void *ptr)
|
||||||
return rb_iseq_memsize(*(const rb_iseq_t **)ptr);
|
return rb_iseq_memsize(*(const rb_iseq_t **)ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
iseqw_ref_update(void *ptr)
|
|
||||||
{
|
|
||||||
VALUE *vptr = ptr;
|
|
||||||
*vptr = rb_gc_location(*vptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const rb_data_type_t iseqw_data_type = {
|
static const rb_data_type_t iseqw_data_type = {
|
||||||
"T_IMEMO/iseq",
|
"T_IMEMO/iseq",
|
||||||
{
|
{
|
||||||
iseqw_mark,
|
iseqw_mark_and_move,
|
||||||
RUBY_TYPED_DEFAULT_FREE,
|
RUBY_TYPED_DEFAULT_FREE,
|
||||||
iseqw_memsize,
|
iseqw_memsize,
|
||||||
iseqw_ref_update,
|
iseqw_mark_and_move,
|
||||||
},
|
},
|
||||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY|RUBY_TYPED_WB_PROTECTED
|
0, 0, RUBY_TYPED_FREE_IMMEDIATELY|RUBY_TYPED_WB_PROTECTED
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue