summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matz Matsumoto <[email protected]>2012-11-17 02:16:35 +0900
committerYukihiro Matz Matsumoto <[email protected]>2012-11-17 02:16:35 +0900
commit7cea9d7b945a4b00cef699f47c07654f8b7bd579 (patch)
treed22dbb5c1a8c9c5d84b337e8e9df64c4327dae35 /src
parentf3191b943ff59506a920b7e3bc54a3bfcb25b4d4 (diff)
downloadmruby-7cea9d7b945a4b00cef699f47c07654f8b7bd579.tar.gz
mruby-7cea9d7b945a4b00cef699f47c07654f8b7bd579.zip
int and mrb_int should not be mixed under -DMRB_INT64; may fix #557
Diffstat (limited to 'src')
-rw-r--r--src/array.c2
-rw-r--r--src/numeric.c3
-rw-r--r--src/string.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/array.c b/src/array.c
index a200de3aa..ea461e029 100644
--- a/src/array.c
+++ b/src/array.c
@@ -772,7 +772,7 @@ mrb_value
mrb_ary_first(mrb_state *mrb, mrb_value self)
{
struct RArray *a = mrb_ary_ptr(self);
- int size;
+ mrb_int size;
if (mrb_get_args(mrb, "|i", &size) == 0) {
return (a->len > 0)? a->ptr[0]: mrb_nil_value();
diff --git a/src/numeric.c b/src/numeric.c
index 562562340..98a60ed30 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -523,7 +523,8 @@ static mrb_value
flo_round(mrb_state *mrb, mrb_value num)
{
double number, f;
- int ndigits = 0, i;
+ mrb_int ndigits = 0;
+ int i;
mrb_get_args(mrb, "|i", &ndigits);
number = mrb_float(num);
diff --git a/src/string.c b/src/string.c
index 2ac4359c8..425b79ca7 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2125,7 +2125,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
mrb_value spat = mrb_nil_value();
enum {awk, string, regexp} split_type = string;
long beg, end, i = 0;
- int lim = -1;
+ mrb_int lim = -1;
mrb_value result, tmp;
argc = mrb_get_args(mrb, "|oi", &spat, &lim);