mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
DEPRECATED_TYPE: is deprecated
Nobody uses this macro any longer.
This commit is contained in:
parent
3437e6247d
commit
21b3bc10d3
Notes:
git
2020-08-27 15:03:26 +09:00
4 changed files with 17 additions and 4 deletions
|
@ -1505,7 +1505,6 @@ RUBY_FUNC_ATTRIBUTE(__pure__, PUREFUNC)
|
|||
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)
|
||||
|
|
|
@ -60,7 +60,23 @@
|
|||
#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))
|
||||
|
|
|
@ -225,7 +225,6 @@ PREDEFINED = \
|
|||
CONSTFUNC(_)=_ \
|
||||
DEPRECATED(_)=_ \
|
||||
DEPRECATED_BY(__,_)=_ \
|
||||
DEPRECATED_TYPE(__,_)=_ \
|
||||
ERRORFUNC(__,_)=_ \
|
||||
MJIT_FUNC_EXPORTED= \
|
||||
MJIT_STATIC=extern \
|
||||
|
|
|
@ -699,7 +699,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
|||
!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
|
||||
|
|
Loading…
Reference in a new issue