mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Removed rb_cData entity
* Use the wrapper of rb_cObject instead of data access * Replaced rest of extentions * Updated the version guard for Data * Added the version guard of rb_cData
This commit is contained in:
parent
c30f03d328
commit
8918a9cf6c
Notes:
git
2020-12-22 02:52:14 +09:00
11 changed files with 24 additions and 31 deletions
|
@ -74,6 +74,7 @@ struct RData {
|
|||
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
||||
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
|
||||
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
|
||||
RUBY_EXTERN VALUE rb_cObject;
|
||||
RBIMPL_SYMBOL_EXPORT_END()
|
||||
|
||||
#define Data_Wrap_Struct(klass, mark, free, sval) \
|
||||
|
@ -162,6 +163,15 @@ rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FU
|
|||
return rb_data_object_wrap(klass, data, dmark, dfree);
|
||||
}
|
||||
|
||||
RBIMPL_ATTR_DEPRECATED(("by: rb_cObject. Will be removed in 3.1."))
|
||||
RBIMPL_ATTR_PURE()
|
||||
static inline VALUE
|
||||
rb_cData(void)
|
||||
{
|
||||
return rb_cObject;
|
||||
}
|
||||
#define rb_cData rb_cData()
|
||||
|
||||
#define rb_data_object_wrap_0 rb_data_object_wrap
|
||||
#define rb_data_object_wrap_1 rb_data_object_wrap_warning
|
||||
#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue