diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-11 08:06:31 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-11 08:06:31 +0000 |
commit | 0f933586024ac407b14983479b9c0ab96ac9bd2b (patch) | |
tree | 8509201685dbf019ffb960dcf0e4d7548e3cae80 /enum.c | |
parent | ddfa68ae564c79e1963c3b48acc1204624d1b83b (diff) | |
download | ruby-0f933586024ac407b14983479b9c0ab96ac9bd2b.tar.gz ruby-0f933586024ac407b14983479b9c0ab96ac9bd2b.tar.xz ruby-0f933586024ac407b14983479b9c0ab96ac9bd2b.zip |
* enum.c (find_index_i): modified to shut warning up.
* enum.c (find_index_iter_i): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -186,8 +186,10 @@ enum_find(int argc, VALUE *argv, VALUE obj) } static VALUE -find_index_i(VALUE i, VALUE *memo) +find_index_i(VALUE i, VALUE memop, int argc, VALUE *argv) { + VALUE *memo = (VALUE*)memop; + if (rb_equal(i, memo[2])) { memo[0] = UINT2NUM(memo[1]); rb_iter_break(); @@ -197,8 +199,9 @@ find_index_i(VALUE i, VALUE *memo) } static VALUE -find_index_iter_i(VALUE i, VALUE *memo, int argc, VALUE *argv) +find_index_iter_i(VALUE i, VALUE memop, int argc, VALUE *argv) { + VALUE *memo = (VALUE*)memop; if (RTEST(enum_yield(argc, argv))) { memo[0] = UINT2NUM(memo[1]); rb_iter_break(); |