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

This commit is contained in:
Nobuyoshi Nakada 2024-06-07 00:49:52 +09:00
parent 9f469ad187
commit ec7babd12d
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465

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