summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-04 07:17:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-04 07:17:59 +0000
commit171a14b36cf61a1aae127d3b73b1aedd0657ab01 (patch)
tree149fdca85ed1cffb6b6e3ca327191137f37ddf67
parentc77a745aab4372227e7ed929ff4d532dc7753d70 (diff)
* string.c: use STR_SHARED instead of ELTS_SHARED.
(same value, but more clear meaning) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f81eb96..6141853 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 4 16:16:58 2014 Koichi Sasada <ko1@atdot.net>
+
+ * string.c: use STR_SHARED instead of ELTS_SHARED.
+ (same value, but more clear meaning)
+
Tue Feb 4 16:09:14 2014 Koichi Sasada <ko1@atdot.net>
* string.c: remvoe STR_ASSOC related code.
diff --git a/string.c b/string.c
index e9d1ae7..89f2963 100644
--- a/string.c
+++ b/string.c
@@ -50,7 +50,7 @@ VALUE rb_cSymbol;
#define RUBY_MAX_CHAR_LEN 16
#define STR_TMPLOCK FL_USER7
#define STR_UNSET_NOCAPA(s) do {\
- if (FL_TEST((s),STR_NOEMBED)) FL_UNSET((s),(ELTS_SHARED));\
+ if (FL_TEST((s),STR_NOEMBED)) FL_UNSET((s),(STR_SHARED));\
} while (0)
#define STR_SET_NOEMBED(str) do {\
@@ -115,7 +115,7 @@ VALUE rb_cSymbol;
#define STR_SET_SHARED(str, shared_str) do { \
RB_OBJ_WRITE((str), &RSTRING(str)->as.heap.aux.shared, (shared_str)); \
- FL_SET((str), ELTS_SHARED); \
+ FL_SET((str), STR_SHARED); \
} while (0)
#define STR_HEAP_PTR(str) (RSTRING(str)->as.heap.ptr)
@@ -942,7 +942,7 @@ rb_str_free(VALUE str)
RUBY_FUNC_EXPORTED size_t
rb_str_memsize(VALUE str)
{
- if (FL_TEST(str, STR_NOEMBED|ELTS_SHARED) == STR_NOEMBED) {
+ if (FL_TEST(str, STR_NOEMBED|STR_SHARED) == STR_NOEMBED) {
return STR_HEAP_SIZE(str);
}
else {
@@ -1024,7 +1024,7 @@ str_replace(VALUE str, VALUE str2)
STR_SET_NOEMBED(str);
RSTRING(str)->as.heap.len = len;
RSTRING(str)->as.heap.ptr = RSTRING_PTR(str2);
- FL_SET(str, ELTS_SHARED);
+ FL_SET(str, STR_SHARED);
STR_SET_SHARED(str, shared);
}
else {
@@ -3548,7 +3548,7 @@ rb_str_drop_bytes(VALUE str, long len)
nlen = olen - len;
if (nlen <= RSTRING_EMBED_LEN_MAX) {
char *oldptr = ptr;
- int fl = (int)(RBASIC(str)->flags & (STR_NOEMBED|ELTS_SHARED));
+ int fl = (int)(RBASIC(str)->flags & (STR_NOEMBED|STR_SHARED));
STR_SET_EMBED(str);
STR_SET_EMBED_LEN(str, nlen);
ptr = RSTRING(str)->as.ary;