summaryrefslogtreecommitdiff
path: root/include/ruby/internal
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2025-12-07 14:51:38 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-12-08 11:47:39 +0900
commitbe882278f22444e7d27db091bbd5f8bf63e882c2 (patch)
tree379a5d18079e3e0cba402977439f8c7885bc3645 /include/ruby/internal
parentf2eece71990fd79a5d7e24999f8df5c1121253c6 (diff)
Move RBIMPL_ATTR_DEPRECATED_* macros to the appropriate header file
Move these macros from include/ruby/backward.h to include/ruby/internal/attr/deprecated.h, alongside the other similar macros. include/ruby/internal/intern/vm.h cannot currently use them because include/ruby/backward.h is included too late.
Diffstat (limited to 'include/ruby/internal')
-rw-r--r--include/ruby/internal/attr/deprecated.h7
-rw-r--r--include/ruby/internal/intern/vm.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/include/ruby/internal/attr/deprecated.h b/include/ruby/internal/attr/deprecated.h
index e1bbdbd15a..9c9dea1df2 100644
--- a/include/ruby/internal/attr/deprecated.h
+++ b/include/ruby/internal/attr/deprecated.h
@@ -72,4 +72,11 @@
# define RBIMPL_ATTR_DEPRECATED_EXT(msg) RBIMPL_ATTR_DEPRECATED(msg)
#endif
+#define RBIMPL_ATTR_DEPRECATED_SINCE(ver) \
+ RBIMPL_ATTR_DEPRECATED(("since " #ver))
+#define RBIMPL_ATTR_DEPRECATED_INTERNAL(ver) \
+ RBIMPL_ATTR_DEPRECATED(("since "#ver", also internal"))
+#define RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() \
+ RBIMPL_ATTR_DEPRECATED(("only for internal use"))
+
#endif /* RBIMPL_ATTR_DEPRECATED_H */
diff --git a/include/ruby/internal/intern/vm.h b/include/ruby/internal/intern/vm.h
index 779f77fe91..0d25a9cdb0 100644
--- a/include/ruby/internal/intern/vm.h
+++ b/include/ruby/internal/intern/vm.h
@@ -95,7 +95,6 @@ VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv);
*/
VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
-#ifdef RBIMPL_ATTR_DEPRECATED_INTERNAL
/**
* This API is practically a variant of rb_proc_call_kw() now. Historically
* when there still was a concept called `$SAFE`, this was an API for that.
@@ -112,7 +111,6 @@ VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int k
*/
RBIMPL_ATTR_DEPRECATED_INTERNAL(4.0)
VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat);
-#endif
/**
* Identical to rb_funcallv(), except it takes Ruby's array instead of C's.