summaryrefslogtreecommitdiff
path: root/internal/numeric.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-27 00:50:41 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-27 02:05:06 +0900
commit26353c75a94469bad7a0e6a6aa81d968e64952d5 (patch)
treeea9c80baa52b68ba840dab278e150f98837e27a5 /internal/numeric.h
parente3a783b14191fef175c9a59996afdc744c8edc4c (diff)
Embed bare `double` if `sizeof(double) == sizeof(VALUE)`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5027
Diffstat (limited to 'internal/numeric.h')
-rw-r--r--internal/numeric.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/numeric.h b/internal/numeric.h
index 440bef1671..19069cb3bc 100644
--- a/internal/numeric.h
+++ b/internal/numeric.h
@@ -35,7 +35,7 @@ enum ruby_num_rounding_mode {
RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT,
};
-#if SIZEOF_DOUBLE < SIZEOF_VALUE
+#if SIZEOF_DOUBLE <= SIZEOF_VALUE
typedef double rb_float_value_type;
#else
typedef struct {
@@ -218,7 +218,7 @@ rb_float_flonum_value(VALUE v)
static inline double
rb_float_noflonum_value(VALUE v)
{
-#if SIZEOF_DOUBLE < SIZEOF_VALUE
+#if SIZEOF_DOUBLE <= SIZEOF_VALUE
return RFLOAT(v)->float_value;
#else
union {