Skip to content

Commit b3fb91f

Browse files
committed
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)".
1 parent 6dc879f commit b3fb91f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ const rb_data_type_t rb_root_namespace_data_type = {
268268
namespace_entry_memsize,
269269
rb_namespace_gc_update_references,
270270
},
271-
0, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers
271+
&rb_namespace_data_type, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers
272272
};
273273

274274
VALUE

0 commit comments

Comments
 (0)