summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-01-07 15:11:25 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-01-07 15:48:06 -0500
commitbc643bbe2e2c1afbed18ce2bcf4aed138fece412 (patch)
tree42bf4d53b9ce08b5b5142edc565498548d71d27f
parentd9ef711f296afbe2a029961e83a03d023ca29f15 (diff)
Use unsigned short for length of embedded strings
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5415
-rw-r--r--include/ruby/internal/core/rstring.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h
index a682dbe22f..4a8aa3f7d3 100644
--- a/include/ruby/internal/core/rstring.h
+++ b/include/ruby/internal/core/rstring.h
@@ -280,7 +280,7 @@ struct RString {
/** 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)