summaryrefslogtreecommitdiff
path: root/include/ruby/internal/core
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 14:28:08 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commitf1dcc3da5d89b0a03cbc280e7eafb845d63a1f6a (patch)
treed1db337b6f82ca54abc90a6c12d179111cf16120 /include/ruby/internal/core
parent68d6bd0873557c12bec6f8e0f8db622f1499d8a7 (diff)
downloadruby-f1dcc3da5d89b0a03cbc280e7eafb845d63a1f6a.tar.gz
Add RBIMPL_RVALUE_EMBED_LEN_MAX neeeded by internal/bignum.h
* It evaluated to 0 before, revealed by -Wundef * See [Feature #17752] Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
Diffstat (limited to 'include/ruby/internal/core')
-rw-r--r--include/ruby/internal/core/rbasic.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/ruby/internal/core/rbasic.h b/include/ruby/internal/core/rbasic.h
index a6093c047a..aafec2422f 100644
--- a/include/ruby/internal/core/rbasic.h
+++ b/include/ruby/internal/core/rbasic.h
@@ -37,10 +37,11 @@
/** @cond INTERNAL_MACRO */
#define RBIMPL_EMBED_LEN_MAX_OF(T) \
- RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
+ RBIMPL_CAST((int)(sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
/** @endcond */
-enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 };
+#define RBIMPL_RVALUE_EMBED_LEN_MAX 3
+enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = RBIMPL_RVALUE_EMBED_LEN_MAX };
struct
RUBY_ALIGNAS(SIZEOF_VALUE)