[前][次][番号順一覧][スレッド一覧]

ruby-changes:70605

From: Nobuyoshi <ko1@a...>
Date: Mon, 27 Dec 2021 00:41:37 +0900 (JST)
Subject: [ruby-changes:70605] 7c738ce5e6 (master): Remove deprecate rb_cData [Bug #18433]

https://git.ruby-lang.org/ruby.git/commit/?id=7c738ce5e6

From 7c738ce5e649b82bdc1305d5c347e81886ee759a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 26 Dec 2021 18:02:09 +0900
Subject: Remove deprecate rb_cData [Bug #18433]

Also enable the warning for T_DATA allocator.
---
 gc.c                               |  3 ---
 include/ruby/internal/core/rdata.h | 24 ------------------------
 2 files changed, 27 deletions(-)

diff --git a/gc.c b/gc.c
index d77dc2cda4c..a5369c28f13 100644
--- a/gc.c
+++ b/gc.c
@@ -2730,10 +2730,7 @@ rb_data_object_check(VALUE klass) https://github.com/ruby/ruby/blob/trunk/gc.c#L2730
 {
     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
     }
 }
 
diff --git a/include/ruby/internal/core/rdata.h b/include/ruby/internal/core/rdata.h
index f6656b65461..43ab3c01e7a 100644
--- a/include/ruby/internal/core/rdata.h
+++ b/include/ruby/internal/core/rdata.h
@@ -369,30 +369,6 @@ rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FU https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/core/rdata.h#L369
     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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]