diff options
| author | cremno <[email protected]> | 2014-09-03 10:00:37 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-09-03 10:00:37 +0200 |
| commit | 26bbc81e122d7f14616dc799e41ef438398669ee (patch) | |
| tree | cc2dca1de150a542ae62e4194dd45d80e18c1786 /src/vm.c | |
| parent | 1fdf47d71aff39b780384969c6883a9a04f9ac90 (diff) | |
| download | mruby-26bbc81e122d7f14616dc799e41ef438398669ee.tar.gz mruby-26bbc81e122d7f14616dc799e41ef438398669ee.zip | |
get rid of shadowing variables
Mostly by renaming the shadowing variable.
If a shadowing variable was deleted,
the shadowed one can be used instead.
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2113,7 +2113,7 @@ RETRY_TRY_BLOCK: else { struct RArray *ary = mrb_ary_ptr(v); int len = ary->len; - int i; + int idx; if (len > pre + post) { regs[a++] = mrb_ary_new_from_values(mrb, len - pre - post, ary->ptr+pre); @@ -2123,11 +2123,11 @@ RETRY_TRY_BLOCK: } else { regs[a++] = mrb_ary_new_capa(mrb, 0); - for (i=0; i+pre<len; i++) { - regs[a+i] = ary->ptr[pre+i]; + for (idx=0; idx+pre<len; i++) { + regs[a+i] = ary->ptr[pre+idx]; } - while (i < post) { - SET_NIL_VALUE(regs[a+i]); + while (idx < post) { + SET_NIL_VALUE(regs[a+idx]); i++; } } |
