diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-10-23 09:45:20 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-10-23 12:54:19 -0400 |
| commit | b3fb91f4d1cc651a112e2e26422e76c6f8323eeb (patch) | |
| tree | 6107042bc43b8595efa1ec6fc474edf92badd6ca | |
| parent | 6dc879f9d6ca85cd46b54a79a43162c483b36ecc (diff) | |
Make Namespace::Root TypedData inherit from Namespace::Entry
The two types of TypedData objects should be treated the same except for
the free function. Since Namespace::Root did not inherit from Namespace::Entry,
all the TypedData_Get_Struct calls for Namespace::Root would raise
"wrong argument type Namespace::Root (expected Namespace::Entry)".
| -rw-r--r-- | namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/namespace.c b/namespace.c index b85cbf5715..4e5a4e9bc4 100644 --- a/namespace.c +++ b/namespace.c @@ -268,7 +268,7 @@ const rb_data_type_t rb_root_namespace_data_type = { namespace_entry_memsize, rb_namespace_gc_update_references, }, - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers + &rb_namespace_data_type, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers }; VALUE |
