mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Remove dead rb_cc_table_free
This commit is contained in:
parent
127cc425b7
commit
b2a7b76992
18
imemo.c
18
imemo.c
@ -571,7 +571,7 @@ rb_vm_ccs_free(struct rb_class_cc_entries *ccs)
|
||||
}
|
||||
|
||||
static enum rb_id_table_iterator_result
|
||||
cc_table_free_i(VALUE ccs_ptr, void *data)
|
||||
cc_tbl_free_i(VALUE ccs_ptr, void *data)
|
||||
{
|
||||
struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)ccs_ptr;
|
||||
VALUE klass = (VALUE)data;
|
||||
@ -582,25 +582,11 @@ cc_table_free_i(VALUE ccs_ptr, void *data)
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
rb_cc_table_free(VALUE klass)
|
||||
{
|
||||
// This can be called and work well only for IClass
|
||||
// And classext_iclass_free uses rb_cc_tbl_free now.
|
||||
// TODO: remove this if it's ok
|
||||
struct rb_id_table *cc_tbl = RCLASS_WRITABLE_CC_TBL(klass);
|
||||
|
||||
if (cc_tbl) {
|
||||
rb_id_table_foreach_values(cc_tbl, cc_table_free_i, (void *)klass);
|
||||
rb_id_table_free(cc_tbl);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
rb_cc_tbl_free(struct rb_id_table *cc_tbl, VALUE klass)
|
||||
{
|
||||
if (!cc_tbl) return;
|
||||
rb_id_table_foreach_values(cc_tbl, cc_table_free_i, (void *)klass);
|
||||
rb_id_table_foreach_values(cc_tbl, cc_tbl_free_i, (void *)klass);
|
||||
rb_id_table_free(cc_tbl);
|
||||
}
|
||||
|
||||
|
||||
@ -150,7 +150,6 @@ static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
|
||||
|
||||
size_t rb_imemo_memsize(VALUE obj);
|
||||
void rb_imemo_mark_and_move(VALUE obj, bool reference_updating);
|
||||
void rb_cc_table_free(VALUE klass);
|
||||
void rb_cc_tbl_free(struct rb_id_table *cc_tbl, VALUE klass);
|
||||
void rb_imemo_free(VALUE obj);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user