summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2021-01-15 06:00:24 +0900
committerKenta Murata <mrkn@mrkn.jp>2021-01-15 06:42:38 +0900
commit500fc63cd03aef44df154b7a3762d07967b80e94 (patch)
treef7c68c5929dbf5e00410643daa631c483566cce3
parent48589f34e49ddb1d3b4399a6390dd02a0d5cded7 (diff)
[ruby/bigdecimal] Reorder the arguments of BigDecimal_divide
https://github.com/ruby/bigdecimal/commit/1e03da7076
-rw-r--r--ext/bigdecimal/bigdecimal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 66be4247bfc..a3df2e54b93 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -1345,7 +1345,7 @@ BigDecimal_mult(VALUE self, VALUE r)
}
static VALUE
-BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
+BigDecimal_divide(VALUE self, VALUE r, Real **c, Real **res, Real **div)
/* For c = self.div(r): with round operation */
{
ENTER(5);
@@ -1392,7 +1392,7 @@ BigDecimal_div(VALUE self, VALUE r)
{
ENTER(5);
Real *c=NULL, *res=NULL, *div = NULL;
- r = BigDecimal_divide(&c, &res, &div, self, r);
+ r = BigDecimal_divide(self, r, &c, &res, &div);
if (!NIL_P(r)) return r; /* coerced by other */
SAVE(c); SAVE(res); SAVE(div);
/* a/b = c + r/b */