summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-26 15:54:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-26 15:54:22 +0000
commitef8e63acb550e62cd9e554db6eb21745713a44c9 (patch)
tree214f3b84e440f8ddfd91291c273dc46929d99ad1 /util.c
parent5f45a040b8b21d75a5887c8846b7d2d76994d04a (diff)
* util.c (powersOf10): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util.c b/util.c
index 6d1c9bc496..449d4bf439 100644
--- a/util.c
+++ b/util.c
@@ -684,7 +684,8 @@ ruby_getcwd()
#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,
@@ -736,7 +737,8 @@ ruby_strtod(string, endPtr)
* 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. */