ruby-changes:72187
From: Alan <ko1@a...>
Date: Thu, 16 Jun 2022 20:20:30 +0900 (JST)
Subject: [ruby-changes:72187] 714a4942fd (master): Remove unused and accidentally public rb_str_shared_root_p()
https://git.ruby-lang.org/ruby.git/commit/?id=714a4942fd From 714a4942fdb1e71ce38032a9f4bab10855a4bea8 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Thu, 16 Jun 2022 07:20:20 -0400 Subject: Remove unused and accidentally public rb_str_shared_root_p() This function was added to a public header in [1] probably unintentionally since it's not used anywhere, exposes implementation details, and isn't related to the goals of that pull request. [1]: 56cc3e99b6b9ec004255280337f6b8353f5e5b06 --- include/ruby/internal/core/rstring.h | 3 --- string.c | 6 ------ 2 files changed, 9 deletions(-) diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h index 7b4953ab8c..e394ab7dca 100644 --- a/include/ruby/internal/core/rstring.h +++ b/include/ruby/internal/core/rstring.h @@ -556,9 +556,6 @@ RSTRING_LENINT(VALUE str) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/core/rstring.h#L556 return rb_long2int(RSTRING_LEN(str)); } -bool -rb_str_shared_root_p(VALUE str); - /** * Convenient macro to obtain the contents and length at once. * diff --git a/string.c b/string.c index 68baa91cc0..e06e7745a6 100644 --- a/string.c +++ b/string.c @@ -233,12 +233,6 @@ rb_str_embed_size(long capa) https://github.com/ruby/ruby/blob/trunk/string.c#L233 return offsetof(struct RString, as.embed.ary) + capa; } -bool -rb_str_shared_root_p(VALUE str) -{ - return FL_TEST_RAW(str, STR_SHARED_ROOT); -} - size_t rb_str_size_as_embedded(VALUE str) { -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/