diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-26 15:54:22 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-26 15:54:22 +0000 |
| commit | 01c1c880d4be63338acc4b6c8a5f6fcbbadc7153 (patch) | |
| tree | 214f3b84e440f8ddfd91291c273dc46929d99ad1 | |
| parent | 715499f90fbec2dc9ff7ef3e3c9c7ad812986303 (diff) | |
| download | ruby-01c1c880d4be63338acc4b6c8a5f6fcbbadc7153.tar.gz ruby-01c1c880d4be63338acc4b6c8a5f6fcbbadc7153.tar.xz ruby-01c1c880d4be63338acc4b6c8a5f6fcbbadc7153.zip | |
* util.c (powersOf10): constified.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | eval.c | 2 | ||||
| -rw-r--r-- | util.c | 6 |
3 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Tue Jun 27 00:54:08 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * util.c (powersOf10): constified. + Mon Jun 26 18:37:44 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/tcltklib.c (ip_delete): fix SEGV when a slave-ip is @@ -1,6 +1,6 @@ /********************************************************************** - eval.e - + eval.c - $Author$ $Date$ @@ -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. */ |
