diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-23 01:25:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-23 01:25:49 +0000 |
commit | 2f95b815b719e6eac5272b34b05c50ca3d926fbd (patch) | |
tree | 16829d0896abcd5aec13a4002eff648e45dd1034 /internal.h | |
parent | f052cb15724c0cfb82633aadd6f3d9ff97c483e6 (diff) | |
download | ruby-2f95b815b719e6eac5272b34b05c50ca3d926fbd.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.h | 4 |
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); |