Skip to content

Commit

Permalink
* math.c (domain_check): ANSI style function arguments
Browse files Browse the repository at this point in the history
* math.c (math_log): too few argument to domain_check().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Jul 27, 2006
1 parent 793a952 commit f0dff3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Jul 28 00:26:47 2006 Yukihiro Matsumoto <matz@ruby-lang.org>

* math.c (domain_check): ANSI style function arguments

* math.c (math_log): too few argument to domain_check().

Thu Jul 27 21:19:54 2006 Yukihiro Matsumoto <matz@ruby-lang.org>

* math.c (domain_check): a new function to check domain error
Expand Down
6 changes: 2 additions & 4 deletions math.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ VALUE rb_mMath;
} while (0)

static void
domain_check(x, msg)
double x;
char *msg;
domain_check(double x, char *msg)
{
while(1) {
if (errno) {
Expand Down Expand Up @@ -325,7 +323,7 @@ math_log(int argc, VALUE *argv)
Need_Float(base);
d /= log(RFLOAT(base)->value);
}
domain_check(d);
domain_check(d, "log");
return rb_float_new(d);
}

Expand Down

0 comments on commit f0dff3c

Please sign in to comment.