Skip to content

Commit

Permalink
Reorder the arguments of BigDecimal_divide
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed Jan 14, 2021
1 parent 1102581 commit 1e03da7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/bigdecimal/bigdecimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 1e03da7

Please sign in to comment.