summaryrefslogtreecommitdiff
path: root/include/ruby/backward/2
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-07-22 14:44:25 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-27 15:03:36 +0900
commitcd1d6d90299d727ad4a87c42f3ba09c87df2bce3 (patch)
treef0d1c0cd85db7296a28824f1758bf7344e8881af /include/ruby/backward/2
parent442525527e2fa052e6d8752adffeaa0855b75ff7 (diff)
include/ruby/backward/2/r_cast.h: deprecate
Remove all usages of RCAST() so that the header file can be excluded from ruby/ruby.h's dependency.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3346
Diffstat (limited to 'include/ruby/backward/2')
-rw-r--r--include/ruby/backward/2/r_cast.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ruby/backward/2/r_cast.h b/include/ruby/backward/2/r_cast.h
index d3f728eb5c..4600699a9e 100644
--- a/include/ruby/backward/2/r_cast.h
+++ b/include/ruby/backward/2/r_cast.h
@@ -24,4 +24,10 @@
*/
#define R_CAST(st) (struct st*)
#define RMOVED(obj) (R_CAST(RMoved)(obj))
+
+#if defined(__GNUC__)
+# warning R_CAST and RMOVED are deprecated
+#elif defined(_MSC_VER)
+# pragma message("warning: R_CAST and RMOVED are deprecated")
+#endif
#endif /* RUBY_BACKWARD2_R_CAST_H */