mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Feature #19998] Untyped Data API has been marked as deprecated
This commit is contained in:
parent
9f469ad187
commit
ec7babd12d
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue