summaryrefslogtreecommitdiff
path: root/include/ruby/internal/encoding
diff options
context:
space:
mode:
authorMike Dalessio <[email protected]>2024-05-24 13:10:10 -0400
committerJean Boussier <[email protected]>2024-05-28 07:33:07 +0200
commit1b8ba1551b26fac906998e34fd2af3f82b433469 (patch)
tree1f26aba3e5ac361be214151b3ab489755d7cebb8 /include/ruby/internal/encoding
parent9e9f1d9301b05604d475573ddd18d6bf5185466c (diff)
Allow compilation of C extensions with `-Wconversion`
C extension maintainers can now compile with this warning option and the Ruby header files will generate no warnings. [Feature #20507]
Diffstat (limited to 'include/ruby/internal/encoding')
-rw-r--r--include/ruby/internal/encoding/encoding.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/encoding/encoding.h b/include/ruby/internal/encoding/encoding.h
index a680651a81..a58f9f2b15 100644
--- a/include/ruby/internal/encoding/encoding.h
+++ b/include/ruby/internal/encoding/encoding.h
@@ -80,7 +80,7 @@ enum ruby_encoding_consts {
static inline void
RB_ENCODING_SET_INLINED(VALUE obj, int encindex)
{
- VALUE f = /* upcast */ encindex;
+ VALUE f = /* upcast */ RBIMPL_CAST((VALUE)encindex);
f <<= RUBY_ENCODING_SHIFT;
RB_FL_UNSET_RAW(obj, RUBY_ENCODING_MASK);