diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-26 10:29:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-26 10:29:13 +0000 |
commit | cbc7f1b89bee06ccad0915821762c41251a97aff (patch) | |
tree | a11cca636df70c1d8f81b92553d62b419e9fe4ad /hash.c | |
parent | 25d66aebccc5df1a24db917d5aaec390576638a8 (diff) |
* hash.c (hash_foreach_iter): fix for prototype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -152,20 +152,20 @@ struct hash_foreach_arg { }; static int -hash_foreach_iter(VALUE key, VALUE value, struct hash_foreach_arg *arg) +hash_foreach_iter(st_data_t key, st_data_t value, struct hash_foreach_arg *arg) { int status; st_table *tbl; tbl = RHASH(arg->hash)->ntbl; - if (key == Qundef) return ST_CONTINUE; - status = (*arg->func)(key, value, arg->arg); + if ((VALUE)key == Qundef) return ST_CONTINUE; + status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg); if (RHASH(arg->hash)->ntbl != tbl) { rb_raise(rb_eRuntimeError, "rehash occurred during iteration"); } switch (status) { case ST_DELETE: - st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef); + st_delete_safe(tbl, &key, 0, Qundef); FL_SET(arg->hash, HASH_DELETED); case ST_CONTINUE: break; |