From 68043e4379705b4e6f9a93bcba046ece61bfc73a Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Jun 2006 23:18:04 +0000 Subject: * math.c (log2): may be a macro. * parse.y (args, block_param, f_args): pass f_post_arg to #params. * util.c (powersOf10): constified. * ext/readline/readline.c: include extconf.h first. * ext/ripper/eventids2.c: removed tLAMBDA_ARG. * ext/tk/tcltklib.c (lib_fromUTF8_core): removed conflict. * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): rb_id2name() is defined as const now. * ext/win32ole/win32ole.c (fole_missing): ditto. * lib/mkmf.rb (create_makefile): force to create extconf header. * lib/optparse.rb (order!): use Proc#yield. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index fbc08de1e..81d3799dc 100644 --- a/util.c +++ b/util.c @@ -669,7 +669,7 @@ ruby_getcwd(void) #define MDMINEXPT DBL_MIN_EXP #define MDMAXEXPT DBL_MAX_EXP -static double powersOf10[] = { /* Table giving binary powers of 10. Entry */ +static const double powersOf10[] = { /* Table giving binary powers of 10. Entry */ 10.0, /* is 10^2^i. Used to convert decimal */ 100.0, /* exponents into floating-point numbers. */ 1.0e4, @@ -721,7 +721,8 @@ ruby_strtod( * address here. */ { int sign, expSign = Qfalse; - double fraction = 0.0, dblExp, *d; + double fraction = 0.0, dblExp; + const double *d; register const char *p; register int c; int exp = 0; /* Exponent read from "EX" field. */ -- cgit