mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove deprecate rb_cData [Bug #18433]
Also enable the warning for T_DATA allocator.
This commit is contained in:
parent
69f03c864e
commit
7c738ce5e6
Notes:
git
2021-12-27 00:34:23 +09:00
2 changed files with 0 additions and 27 deletions
3
gc.c
3
gc.c
|
@ -2730,10 +2730,7 @@ rb_data_object_check(VALUE klass)
|
|||
{
|
||||
if (klass != rb_cObject && (rb_get_alloc_func(klass) == rb_class_allocate_instance)) {
|
||||
rb_undef_alloc_func(klass);
|
||||
#if RUBY_VERSION_SINCE(3, 2)
|
||||
RBIMPL_TODO("enable the warning at this release");
|
||||
rb_warn("undefining the allocator of T_DATA class %"PRIsVALUE, klass);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -369,30 +369,6 @@ 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()
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @deprecated There once was a variable called rb_cData, which no longer
|
||||
* exists today. This function is a function because we want
|
||||
* warnings for the usages.
|
||||
*/
|
||||
static inline VALUE
|
||||
rb_cData(void)
|
||||
{
|
||||
return rb_cObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @deprecated This macro once was a thing in the old days, but makes no sense
|
||||
* any longer today. Exists here for backwards compatibility
|
||||
* only. You can safely forget about it.
|
||||
*/
|
||||
#define rb_cData rb_cData()
|
||||
|
||||
/** @cond INTERNAL_MACRO */
|
||||
#define rb_data_object_wrap_0 rb_data_object_wrap
|
||||
#define rb_data_object_wrap_1 rb_data_object_wrap_warning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue