зеркало из https://github.com/github/ruby.git
string.c: use raw macro
* string.c (str_new_frozen): use raw macro for RString object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
907b6d32be
Коммит
8f4e6f14d8
2
string.c
2
string.c
|
@ -1025,7 +1025,7 @@ str_new_frozen(VALUE klass, VALUE orig)
|
|||
str = str_new(klass, RSTRING_PTR(orig), RSTRING_LEN(orig));
|
||||
}
|
||||
else {
|
||||
if (FL_TEST(orig, STR_SHARED)) {
|
||||
if (FL_TEST_RAW(orig, STR_SHARED)) {
|
||||
VALUE shared = RSTRING(orig)->as.heap.aux.shared;
|
||||
long ofs = RSTRING(orig)->as.heap.ptr - RSTRING(shared)->as.heap.ptr;
|
||||
long rest = RSTRING(shared)->as.heap.len - ofs - RSTRING(orig)->as.heap.len;
|
||||
|
|
Загрузка…
Ссылка в новой задаче