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?= 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(-) (limited to 'include') diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h index fea2933a73..a682dbe22f 100644 --- a/include/ruby/internal/core/rstring.h +++ b/include/ruby/internal/core/rstring.h @@ -276,14 +276,9 @@ struct RString { 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 { */ 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.3