ruby-changes:62716
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Thu, 27 Aug 2020 15:03:20 +0900 (JST)
Subject: [ruby-changes:62716] 21b3bc10d3 (master): DEPRECATED_TYPE: is deprecated
https://git.ruby-lang.org/ruby.git/commit/?id=21b3bc10d3 From 21b3bc10d3626272683e085b2b3ea62d2c05b1d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Wed, 22 Jul 2020 10:55:30 +0900 Subject: DEPRECATED_TYPE: is deprecated Nobody uses this macro any longer. diff --git a/configure.ac b/configure.ac index 37b4c53..a6734df 100644 --- a/configure.ac +++ b/configure.ac @@ -1505,7 +1505,6 @@ RUBY_FUNC_ATTRIBUTE(__pure__, PUREFUNC) https://github.com/ruby/ruby/blob/trunk/configure.ac#L1505 RUBY_FUNC_ATTRIBUTE(__noreturn__, NORETURN) RUBY_FUNC_ATTRIBUTE(__deprecated__, DEPRECATED) RUBY_FUNC_ATTRIBUTE(__deprecated__("by "@%:@n), DEPRECATED_BY(n,x), rb_cv_func_deprecated_by) -RUBY_TYPE_ATTRIBUTE(__deprecated__ mesg, DEPRECATED_TYPE(mesg,x), rb_cv_type_deprecated) RUBY_FUNC_ATTRIBUTE(__noinline__, NOINLINE) RUBY_FUNC_ATTRIBUTE(__always_inline__, ALWAYS_INLINE) RUBY_FUNC_ATTRIBUTE(__no_sanitize__(san), NO_SANITIZE(san, x), rb_cv_func_no_sanitize) diff --git a/include/ruby/backward/2/attributes.h b/include/ruby/backward/2/attributes.h index 8d00da0..74dca62 100644 --- a/include/ruby/backward/2/attributes.h +++ b/include/ruby/backward/2/attributes.h @@ -60,7 +60,23 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/2/attributes.h#L60 #define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " # n)) x #undef DEPRECATED_TYPE -#define DEPRECATED_TYPE(mseg, decl) decl RBIMPL_ATTR_DEPRECATED(mseg) +#if defined(__GNUC__) +# define DEPRECATED_TYPE(mesg, decl) \ + _Pragma("message \"DEPRECATED_TYPE is deprecated, " \ + "use RBIMPL_ATTR_DEPRECATED instead\""); \ + decl RBIMPL_ATTR_DEPRECATED(mseg) +#elif defined(_MSC_VER) +# pragma deprecated(DEPRECATED_TYPE) +# define DEPRECATED_TYPE(mesg, decl) \ + __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: " \ + "DEPRECATED_TYPE is deprecated, " \ + "use RBIMPL_ATTR_DEPRECATED instead")) \ + decl RBIMPL_ATTR_DEPRECATED(mseg) +#else +# define DEPRECATED_TYPE(mesg, decl) \ + <-<-"DEPRECATED_TYPE is deprecated, " \ + "use RBIMPL_ATTR_DEPRECATED instead"->-> +#endif #undef RUBY_CXX_DEPRECATED #define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg)) diff --git a/template/Doxyfile.tmpl b/template/Doxyfile.tmpl index 5473474..4f6c432 100644 --- a/template/Doxyfile.tmpl +++ b/template/Doxyfile.tmpl @@ -225,7 +225,6 @@ PREDEFINED = \ https://github.com/ruby/ruby/blob/trunk/template/Doxyfile.tmpl#L225 CONSTFUNC(_)=_ \ DEPRECATED(_)=_ \ DEPRECATED_BY(__,_)=_ \ - DEPRECATED_TYPE(__,_)=_ \ ERRORFUNC(__,_)=_ \ MJIT_FUNC_EXPORTED= \ MJIT_STATIC=extern \ diff --git a/win32/Makefile.sub b/win32/Makefile.sub index df85095..87cda5f 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -699,7 +699,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L699 !endif !if $(MSC_VER) >= 1300 #define DEPRECATED(x) __declspec(deprecated) x -#define DEPRECATED_TYPE(mesg, x) __declspec(deprecated mesg) x #define RUBY_CXX_DEPRECATED(mesg) __declspec(deprecated(mesg)) #define NOINLINE(x) __declspec(noinline) x !endif -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/