ruby-changes:69452
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 26 Oct 2021 09:31:46 +0900 (JST)
Subject: [ruby-changes:69452] 7d4c59203f (master): improve doc coverage [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=7d4c59203f From 7d4c59203ffe16a7409358f69a48768a9e6d0fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Tue, 26 Oct 2021 09:30:42 +0900 Subject: improve doc coverage [ci skip] Just split the comment for struct's one and array's one. --- include/ruby/internal/core/rstring.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h index fea2933a739..a682dbe22fb 100644 --- a/include/ruby/internal/core/rstring.h +++ b/include/ruby/internal/core/rstring.h @@ -276,14 +276,9 @@ struct RString { https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/core/rstring.h#L276 VALUE shared; } aux; } heap; + + /** Embedded contents. */ struct { - /** - * Embedded contents. When a string is short enough, it uses this area - * to store the contents themselves. This was impractical in the 20th - * century, but these days 64 bit machines can typically hold 24 bytes - * here. Could be sufficiently large. In this case the length is - * encoded into the flags. - */ #if USE_RVARGC short len; /* This is a length 1 array because: @@ -293,6 +288,13 @@ struct RString { https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/core/rstring.h#L288 */ char ary[1]; #else + /** + * When a string is short enough, it uses this area to store the + * contents themselves. This was impractical in the 20th century, + * but these days 64 bit machines can typically hold 24 bytes here. + * Could be sufficiently large. In this case the length is encoded + * into the flags. + */ char ary[RSTRING_EMBED_LEN_MAX + 1]; #endif } embed; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/