mirror of
https://github.com/ruby/ruby.git
synced 2026-08-12 08:20:37 +08:00
[Feature #19998] Untyped Data API has been marked as deprecated
This commit is contained in:
parent
9f469ad187
commit
ec7babd12d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user