[Feature #19998] Untyped Data API has been marked as deprecated

This commit is contained in:
Nobuyoshi Nakada committed 2024-06-07 00:49:52 +09:00
1 parent 9f469ad187
commit ec7babd12d
1 file changed
+5 -1
+5 -1
View File
@@ -1,9 +1,13 @@
#include "ruby.h"
static const rb_data_type_t my_integer_type = {
"MyInteger", {0}, 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
static VALUE
my_integer_s_new(VALUE klass)
{
return Data_Wrap_Struct(klass, 0, 0, 0);
return TypedData_Wrap_Struct(klass, &my_integer_type, 0);
}
void