aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2021-10-26 09:30:42 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2021-10-26 09:30:42 +0900
commit7d4c59203ffe16a7409358f69a48768a9e6d0fb1 (patch)
tree0ca75344f8fd7bb66e14c03fce44d6ef4cf51013 /include
parenta0029ae2b68cec3a4cb298967afbc9192d331c10 (diff)
downloadruby-7d4c59203ffe16a7409358f69a48768a9e6d0fb1.tar.gz
improve doc coverage [ci skip]
Just split the comment for struct's one and array's one.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/core/rstring.h16
1 files changed, 9 insertions, 7 deletions
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;