diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-08 00:51:16 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-08 00:51:16 +0000 |
commit | 46c954bfdabf5176fbd05e39da2fea61257e3392 (patch) | |
tree | 889c1d2ae92c3dbc0dc00a4e45ed2a91cc450b0c /st.c | |
parent | b4f51b41e2de7c6c6d4124af83064624749a36dd (diff) |
* lib/cgi.rb (CGI::Cookie): [ruby-talk:130040]
* object.c: [ruby-doc:818]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -480,7 +480,7 @@ st_cleanup_safe(table, never) table->num_entries = num_entries; } -void +int st_foreach(table, func, arg) st_table *table; int (*func)(); @@ -493,7 +493,7 @@ st_foreach(table, func, arg) for(i = 0; i < table->num_bins; i++) { last = 0; for(ptr = table->bins[i]; ptr != 0;) { - retval = (*func)(ptr->key, ptr->record, arg, 0); + retval = (*func)(ptr->key, ptr->record, arg); switch (retval) { case ST_CHECK: /* check if hash is modified during iteration */ tmp = 0; @@ -504,8 +504,7 @@ st_foreach(table, func, arg) } if (!tmp) { /* call func with error notice */ - retval = (*func)(0, 0, arg, 1); - return; + return 1; } /* fall through */ case ST_CONTINUE: @@ -513,7 +512,7 @@ st_foreach(table, func, arg) ptr = ptr->next; break; case ST_STOP: - return; + return 0; case ST_DELETE: tmp = ptr; if (last == 0) { @@ -528,6 +527,7 @@ st_foreach(table, func, arg) } } } + return 0; } static int |