summaryrefslogtreecommitdiff
path: root/variable.h
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-06-16 11:19:12 +0200
committerJean Boussier <[email protected]>2025-06-17 15:28:05 +0200
commitcd9f447be247478d2eb3da985295735cce20cb23 (patch)
tree1f87f079323e42a71f07b862b6d32daa6260e5b7 /variable.h
parent164486a954e3cf3e716393c5f9a9e2c4dd776993 (diff)
Refactor generic fields to use `T_IMEMO/fields` objects.
Followup: https://github.com/ruby/ruby/pull/13589 This simplify a lot of things, as we no longer need to manually manage the memory, we can use the Read-Copy-Update pattern and avoid numerous race conditions. Co-Authored-By: Étienne Barrié <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13626
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/variable.h b/variable.h
index 54b7fc5461..82a79c63ce 100644
--- a/variable.h
+++ b/variable.h
@@ -12,18 +12,7 @@
#include "shape.h"
-struct gen_fields_tbl {
- union {
- struct {
- VALUE fields[1];
- } shape;
- struct {
- st_table *table;
- } complex;
- } as;
-};
-
-int rb_ivar_generic_fields_tbl_lookup(VALUE obj, struct gen_fields_tbl **);
+int rb_ivar_generic_fields_tbl_lookup(VALUE obj, VALUE *);
void rb_copy_complex_ivars(VALUE dest, VALUE obj, shape_id_t src_shape_id, st_table *fields_table);
void rb_free_rb_global_tbl(void);