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

ruby-changes:70783

From: Peter <ko1@a...>
Date: Sat, 8 Jan 2022 05:48:26 +0900 (JST)
Subject: [ruby-changes:70783] bc643bbe2e (master): Use unsigned short for length of embedded strings

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

From bc643bbe2e2c1afbed18ce2bcf4aed138fece412 Mon Sep 17 00:00:00 2001
From: Peter Zhu <peter@p...>
Date: Fri, 7 Jan 2022 15:11:25 -0500
Subject: Use unsigned short for length of embedded strings

---
 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 a682dbe22fb..4a8aa3f7d34 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. */
         struct {
 #if USE_RVARGC
-            short len;
+            unsigned short len;
             /* This is a length 1 array because:
              *   1. GCC has a bug that does not optimize C flexible array members
              *      (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)
-- 
cgit v1.2.1


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

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