summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-06-17 10:51:23 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-06-17 10:51:23 +0900
commitb0f918d1bd74bdd6afaeb4df83db857ff0c13c92 (patch)
tree6e0870594ae9bae1327c96b210c78ddbc36ea4be
parent4b55174fc5018be6ca5e91da04c599ef8cfd78c5 (diff)
downloadmruby-b0f918d1bd74bdd6afaeb4df83db857ff0c13c92.tar.gz
mruby-b0f918d1bd74bdd6afaeb4df83db857ff0c13c92.zip
Use `mrb_int` instead of `int`.
-rw-r--r--src/numeric.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/numeric.c b/src/numeric.c
index 7d7814e43..6c9875719 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -426,13 +426,13 @@ flo_hash(mrb_state *mrb, mrb_value num)
mrb_float d;
char *c;
size_t i;
- int hash;
+ mrb_int hash;
d = (mrb_float)mrb_fixnum(num);
/* normalize -0.0 to 0.0 */
if (d == 0) d = 0.0;
c = (char*)&d;
- for (hash=0, i=0; i<sizeof(mrb_float);i++) {
+ for (hash=0,i=0; i<sizeof(mrb_float); i++) {
hash = (hash * 971) ^ (unsigned char)c[i];
}
if (hash < 0) hash = -hash;