diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-05-23 20:14:20 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-05-25 15:22:43 +0900 |
commit | aad9fa285398d48b5647f8a36922b8d817a24156 () | |
tree | b789aa228c8cfe1f3e006cc9156970587aa19514 /memory_view.c | |
parent | fc518fe1ff0410f836b01577b8c4f3940404a24b (diff) |
Use RB_VM_LOCKING
Notes: Merged: https://.com/ruby/ruby/pull/13439
-rw-r--r-- | memory_view.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -51,11 +51,11 @@ exported_object_registry_mark(void *ptr) static void exported_object_registry_free(void *ptr) { - RB_VM_LOCK_ENTER(); - st_clear(exported_object_table); - st_free_table(exported_object_table); - exported_object_table = NULL; - RB_VM_LOCK_LEAVE(); } const rb_data_type_t rb_memory_view_exported_object_registry_data_type = { @@ -99,18 +99,18 @@ exported_object_dec_ref(st_data_t *key, st_data_t *val, st_data_t arg, int exist static void register_exported_object(VALUE obj) { - RB_VM_LOCK_ENTER(); - st_update(exported_object_table, (st_data_t)obj, exported_object_add_ref, 0); - RB_VM_LOCK_LEAVE(); } static void unregister_exported_object(VALUE obj) { - RB_VM_LOCK_ENTER(); - if (exported_object_table) - st_update(exported_object_table, (st_data_t)obj, exported_object_dec_ref, 0); - RB_VM_LOCK_LEAVE(); } // MemoryView |