summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-25 02:18:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-25 02:18:32 +0000
commit6e54a6df2291715bedaac454c34880b242848d78 (patch)
tree8520e8e4157125dff040b950fc1399c44d17a917 /iseq.c
parent8101cc3de4a846f11b76be637c3260aaa73e0b3c (diff)
iseq.c: fix type
* iseq.c (rb_iseq_disasm, iseq_data_to_ary): fix loop counter type for array length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/iseq.c b/iseq.c
index 79aa076..bc1d60b 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1461,8 +1461,8 @@ rb_iseq_disasm(const rb_iseq_t *iseq)
n += rb_iseq_disasm_insn(str, code, n, iseq, child);
}
- for (i = 0; i < RARRAY_LEN(child); i++) {
- VALUE isv = rb_ary_entry(child, i);
+ for (l = 0; l < RARRAY_LEN(child); l++) {
+ VALUE isv = rb_ary_entry(child, l);
rb_str_concat(str, rb_iseq_disasm((rb_iseq_t *)isv));
}
@@ -1663,7 +1663,8 @@ cdhash_each(VALUE key, VALUE value, VALUE ary)
static VALUE
iseq_data_to_ary(const rb_iseq_t *iseq)
{
- long i;
+ unsigned int i;
+ long l;
size_t ti;
unsigned int pos;
unsigned int line = 0;
@@ -1916,8 +1917,8 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
body = rb_ary_new();
ti = 0;
- for (i=0, pos=0; i<RARRAY_LEN(nbody); i++) {
- VALUE ary = RARRAY_AREF(nbody, i);
+ for (l=0, pos=0; l<RARRAY_LEN(nbody); l++) {
+ VALUE ary = RARRAY_AREF(nbody, l);
st_data_t label;
if (st_lookup(labels_table, pos, &label)) {