diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-07-30 12:44:39 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-08-01 10:42:04 +0200 |
| commit | f2a7e48deadb9101d49c9b613abf5a83c9e1dd49 (patch) | |
| tree | 45a61c8a5dc4c2bca1b84d6a54c67a8abed658db /imemo.c | |
| parent | fc5e1541e4bb4b7995b6acc1ea6121b60fc64e7a (diff) | |
Make `RClass.cc_table` a managed object
For now this doesn't change anything, but now that the table
is managed by GC, it opens the door to use RCU when in multi-ractor
mode, hence allow unsynchornized reads.
Diffstat (limited to 'imemo.c')
| -rw-r--r-- | imemo.c | 20 |
1 files changed, 0 insertions, 20 deletions
@@ -550,26 +550,6 @@ rb_vm_ccs_free(struct rb_class_cc_entries *ccs) vm_ccs_free(ccs, true, Qundef); } -static enum rb_id_table_iterator_result -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; - VM_ASSERT(vm_ccs_p(ccs)); - - vm_ccs_free(ccs, false, klass); - - return ID_TABLE_CONTINUE; -} - -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_tbl_free_i, (void *)klass); - rb_id_table_free(cc_tbl); -} - static inline void imemo_fields_free(struct rb_fields *fields) { |
