aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-23 01:25:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-23 01:25:49 +0000
commit21dbe868f8d0445ed28f58bd4e9efce21551b040 (patch)
tree16829d0896abcd5aec13a4002eff648e45dd1034 /internal.h
parent33f5edd5f339c03e51cbdf00dbb384df58781c24 (diff)
downloadruby-21dbe868f8d0445ed28f58bd4e9efce21551b040.tar.gz
string.c: taint flags
* include/ruby/ruby.h: add raw FL macros, which assume always the argument object is not a special constant. * internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING. * string.c: deal with taint flags directly across String instances. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal.h b/internal.h
index 5ba73847fa..c2e5a5b757 100644
--- a/internal.h
+++ b/internal.h
@@ -1114,8 +1114,8 @@ VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
#endif
#define STR_NOEMBED FL_USER1
#define STR_SHARED FL_USER2 /* = ELTS_SHARED */
-#define STR_EMBED_P(str) (!FL_TEST((str), STR_NOEMBED))
-#define STR_SHARED_P(s) FL_ALL((s), STR_NOEMBED|ELTS_SHARED)
+#define STR_EMBED_P(str) (!FL_TEST_RAW((str), STR_NOEMBED))
+#define STR_SHARED_P(s) FL_ALL_RAW((s), STR_NOEMBED|ELTS_SHARED)
#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
size_t rb_str_memsize(VALUE);