summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-09 23:18:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-09 23:18:04 +0000
commit68043e4379705b4e6f9a93bcba046ece61bfc73a (patch)
tree29da7e6c2a3d146f50323f12573e3ba4fb5bbb64 /util.c
parent713cb5c51298df218cc2ac69a4ce9be8e458af8d (diff)
downloadruby-68043e4379705b4e6f9a93bcba046ece61bfc73a.tar.gz
ruby-68043e4379705b4e6f9a93bcba046ece61bfc73a.tar.xz
ruby-68043e4379705b4e6f9a93bcba046ece61bfc73a.zip
* 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
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 3 insertions, 2 deletions
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. */