summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author卜部昌平 <[email protected]>2021-01-20 11:13:06 +0900
committer卜部昌平 <[email protected]>2021-01-27 09:30:15 +0900
commitc7d138772167a9a489ebe062ee3027e838489e8d (patch)
tree2d4fa788a5da60b4c4d666d6bbc012f5630a51a2 /include
parent0300dec32b5a25b409dc5dfa59b81f4e39fab501 (diff)
warnings on use of RUBY_FL_TAINT
matz said in [ruby-core:94979]: > 3.0: > * taint/trust/untaint/untrust non-verbose warning when called This is it, for C extensions.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4100
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/fl_type.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h
index 01c1d2b4d5..6641dfe4cb 100644
--- a/include/ruby/internal/fl_type.h
+++ b/include/ruby/internal/fl_type.h
@@ -22,6 +22,7 @@
*/
#include "ruby/internal/config.h" /* for ENUM_OVER_INT */
#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/deprecated.h"
#include "ruby/internal/attr/flag_enum.h"
#include "ruby/internal/attr/forceinline.h"
#include "ruby/internal/attr/noalias.h"
@@ -165,9 +166,13 @@ ruby_fl_type {
RUBY_FL_PROMOTED1 = (1<<6),
RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1,
RUBY_FL_FINALIZE = (1<<7),
- RUBY_FL_TAINT = (1<<8),
+ RUBY_FL_TAINT
+ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+ = (1<<8),
RUBY_FL_SHAREABLE = (1<<8),
- RUBY_FL_UNTRUSTED = RUBY_FL_TAINT,
+ RUBY_FL_UNTRUSTED
+ RBIMPL_ATTR_DEPRECATED(("trustedness turned out to be a wrong idea."))
+ = (1<<8),
RUBY_FL_SEEN_OBJ_ID = (1<<9),
RUBY_FL_EXIVAR = (1<<10),
RUBY_FL_FREEZE = (1<<11),
@@ -359,6 +364,7 @@ RB_FL_REVERSE(VALUE obj, VALUE flags)
RBIMPL_ATTR_PURE_UNLESS_DEBUG()
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline bool
RB_OBJ_TAINTABLE(VALUE obj)
{
@@ -367,6 +373,7 @@ RB_OBJ_TAINTABLE(VALUE obj)
RBIMPL_ATTR_PURE_UNLESS_DEBUG()
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline VALUE
RB_OBJ_TAINTED_RAW(VALUE obj)
{
@@ -375,6 +382,7 @@ RB_OBJ_TAINTED_RAW(VALUE obj)
RBIMPL_ATTR_PURE_UNLESS_DEBUG()
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline bool
RB_OBJ_TAINTED(VALUE obj)
{
@@ -382,6 +390,7 @@ RB_OBJ_TAINTED(VALUE obj)
}
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline void
RB_OBJ_TAINT_RAW(VALUE obj)
{
@@ -389,6 +398,7 @@ RB_OBJ_TAINT_RAW(VALUE obj)
}
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline void
RB_OBJ_TAINT(VALUE obj)
{
@@ -396,6 +406,7 @@ RB_OBJ_TAINT(VALUE obj)
}
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline void
RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
{
@@ -403,6 +414,7 @@ RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
}
RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
static inline void
RB_OBJ_INFECT(VALUE dst, VALUE src)
{