summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 15:47:54 +0000
committermichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 15:47:54 +0000
commitffc13a6525c7c72cbb858380e6870106bf5a7dfa (patch)
tree3b51176716a877c59eebbe6e82533d2cae3d7bc5 /array.c
parent022d1f123c6149915970b4cac9664f66d8d5875c (diff)
*.c: Int vs Long cleanup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/array.c b/array.c
index bf3aa5c..8ec5600 100644
--- a/array.c
+++ b/array.c
@@ -250,7 +250,7 @@ rb_ary_initialize(argc, argv, ary)
rb_raise(rb_eArgError, "wrong number of arguments");
}
for (i=0; i<len; i++) {
- RARRAY(ary)->ptr[i] = rb_yield(INT2NUM(i));
+ RARRAY(ary)->ptr[i] = rb_yield(LONG2NUM(i));
RARRAY(ary)->len = i + 1;
}
}
@@ -595,7 +595,7 @@ rb_ary_rindex(ary, val)
while (i--) {
if (rb_equal(RARRAY(ary)->ptr[i], val))
- return INT2NUM(i);
+ return LONG2NUM(i);
}
return Qnil;
}
@@ -762,7 +762,7 @@ rb_ary_each_index(ary)
long i;
for (i=0; i<RARRAY(ary)->len; i++) {
- rb_yield(INT2NUM(i));
+ rb_yield(LONG2NUM(i));
}
return ary;
}
@@ -783,7 +783,7 @@ static VALUE
rb_ary_length(ary)
VALUE ary;
{
- return INT2NUM(RARRAY(ary)->len);
+ return LONG2NUM(RARRAY(ary)->len);
}
static VALUE
@@ -1408,7 +1408,7 @@ rb_ary_fill(argc, argv, ary)
if (block_p) {
while (p < pend) {
- *p++ = rb_yield(INT2NUM(beg++));
+ *p++ = rb_yield(LONG2NUM(beg++));
}
}
else {
@@ -1767,7 +1767,7 @@ rb_ary_nitems(ary)
if (!NIL_P(*p)) n++;
p++;
}
- return INT2NUM(n);
+ return LONG2NUM(n);
}
static long