[前][次][番号順一覧][スレッド一覧]

ruby-changes:69453

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 26 Oct 2021 09:31:47 +0900 (JST)
Subject: [ruby-changes:69453] a0029ae2b6 (master): just another evidence that @shyouhei is an idiot [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=a0029ae2b6

From a0029ae2b68cec3a4cb298967afbc9192d331c10 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:24:56 +0900
Subject: just another evidence that @shyouhei is an idiot [ci skip]

(gdb) ptype/o struct RString
/* offset    |  size */  type = struct RString {
/*    0      |    16 */    struct RBasic {
/*    0      |     8 */        VALUE flags;
/*    8      |     8 */        const VALUE klass;

                               /* total size (bytes):   16 */
                           } basic;
/*   16      |    24 */    union {
/*                24 */        struct {
/*   16      |     8 */            long len;
/*   24      |     8 */            char *ptr;
/*   32      |     8 */            union {
/*                 8 */                long capa;
/*                 8 */                VALUE shared;

                                       /* total size (bytes):    8 */
                                   } aux;

                                   /* total size (bytes):   24 */
                               } heap;
/*                24 */        struct {
/*   16      |    24 */            char ary[24];

                                   /* total size (bytes):   24 */
                               } embed;
/* XXX  8-byte padding  */

                               /* total size (bytes):   24 */
                           } as;

                           /* total size (bytes):   40 */
                         }
(gdb)
---
 include/ruby/internal/core/rstring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h
index b7cf142156f..fea2933a739 100644
--- a/include/ruby/internal/core/rstring.h
+++ b/include/ruby/internal/core/rstring.h
@@ -280,7 +280,7 @@ struct RString { https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/core/rstring.h#L280
             /**
             * 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 48 bytes
+            * 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.
             */
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]