summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2025-09-24 02:34:45 +0900
committerKoichi Sasada <ko1@atdot.net>2025-10-23 13:08:26 +0900
commit45907b1b00d09ce2c40f5073ff540d8b63217d96 (patch)
treea2892e4cd0d6f8b37e081e56cf90d3725f91f4cc /string.c
parent271be0a2258061be486e24dc61994a3f4155d669 (diff)
add SET_SHAREABLE macros
* `RB_OBJ_SET_SHAREABLE(obj)` makes obj shareable. All of reachable objects from `obj` should be shareable. * `RB_OBJ_SET_FROZEN_SHAREABLE(obj)` same as above but freeze `obj` before making it shareable. Also `rb_gc_verify_shareable(obj)` is introduced to check the `obj` does not violate shareable rule (an shareable object only refers shareable objects) strictly. The rule has some exceptions (some shareable objects can refer to unshareable objects, such as a Ractor object (which is a shareable object) can refer to the Ractor local objects. To handle such case, `check_shareable` flag is also introduced. `STRICT_VERIFY_SHAREABLE` macro is also introduced to verify the strict shareable rule at `SET_SHAREABLE`.
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions