From 500fc63cd03aef44df154b7a3762d07967b80e94 Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Fri, 15 Jan 2021 06:00:24 +0900 Subject: [ruby/bigdecimal] Reorder the arguments of BigDecimal_divide https://github.com/ruby/bigdecimal/commit/1e03da7076 --- ext/bigdecimal/bigdecimal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 66be4247bf..a3df2e54b9 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 */ -- cgit v1.2.3