diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-14 10:21:55 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-14 10:21:55 +0900 |
commit | 048f14221cc8498ea8e5e339b6744288788a0303 (patch) | |
tree | c2f66df070d5af41398e7205bfb0a31e6b91e2ac /string.c | |
parent | 56cc3e99b6b9ec004255280337f6b8353f5e5b06 (diff) |
Add placeholder to let braces match
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -299,7 +299,8 @@ rb_str_make_independent(VALUE str) } void -rb_str_make_embedded(VALUE str) { +rb_str_make_embedded(VALUE str) +{ RUBY_ASSERT(rb_str_reembeddable_p(str)); RUBY_ASSERT(!STR_EMBED_P(str)); @@ -1806,15 +1807,14 @@ str_duplicate_setup(VALUE klass, VALUE str, VALUE dup) } assert(!STR_SHARED_P(root)); assert(RB_OBJ_FROZEN_RAW(root)); -#if USE_RVARGC - if (1) { -#else - if (STR_EMBED_P(root)) { + if (0) {} +#if !USE_RVARGC + else if (STR_EMBED_P(root)) { MEMCPY(RSTRING(dup)->as.embed.ary, RSTRING(root)->as.embed.ary, char, RSTRING_EMBED_LEN_MAX + 1); } - else { #endif + else { RSTRING(dup)->as.heap.len = RSTRING_LEN(str); RSTRING(dup)->as.heap.ptr = RSTRING_PTR(str); RB_OBJ_WRITE(dup, &RSTRING(dup)->as.heap.aux.shared, root); |