summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2022-11-15 15:58:56 +0900
committergit <svn-admin@ruby-lang.org>2022-11-15 06:59:11 +0000
commitc75de1e3304e804be9c073940f396c8a506a005f (patch)
tree541520109664af47069f6d0e3870511929c5b28d /ext/bigdecimal
parentc925a2ee91a06cd91f6c1045d69041c699f12105 (diff)
[ruby/bigdecimal] Add fallback definition of MAYBE_UNUSED
https://github.com/ruby/bigdecimal/commit/b2123faa52
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 9b1d33ed9d..d6ea35c615 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -107,6 +107,10 @@ static struct {
# define RB_OBJ_STRING(obj) StringValueCStr(obj)
#endif
+#ifndef MAYBE_UNUSED
+# define MAYBE_UNUSED(x) x
+#endif
+
#define BIGDECIMAL_POSITIVE_P(bd) ((bd)->sign > 0)
#define BIGDECIMAL_NEGATIVE_P(bd) ((bd)->sign < 0)