mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
improve deprecation warning
We should not recommend RBIMPL_*.
This commit is contained in:
parent
21b3bc10d3
commit
442525527e
Notes:
git
2020-08-27 15:03:25 +09:00
1 changed files with 4 additions and 7 deletions
|
|
@ -61,21 +61,18 @@
|
|||
|
||||
#undef DEPRECATED_TYPE
|
||||
#if defined(__GNUC__)
|
||||
# define DEPRECATED_TYPE(mesg, decl) \
|
||||
_Pragma("message \"DEPRECATED_TYPE is deprecated, " \
|
||||
"use RBIMPL_ATTR_DEPRECATED instead\""); \
|
||||
# define DEPRECATED_TYPE(mesg, decl) \
|
||||
_Pragma("message \"DEPRECATED_TYPE is deprecated\""); \
|
||||
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")) \
|
||||
"DEPRECATED_TYPE is deprecated")) \
|
||||
decl RBIMPL_ATTR_DEPRECATED(mseg)
|
||||
#else
|
||||
# define DEPRECATED_TYPE(mesg, decl) \
|
||||
<-<-"DEPRECATED_TYPE is deprecated, " \
|
||||
"use RBIMPL_ATTR_DEPRECATED instead"->->
|
||||
<-<-"DEPRECATED_TYPE is deprecated"->->
|
||||
#endif
|
||||
|
||||
#undef RUBY_CXX_DEPRECATED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue