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 | 1338dcea730a2722cb8175baeb882ffcf3dfe7c2 (patch) | |
| tree | 889c1d2ae92c3dbc0dc00a4e45ed2a91cc450b0c /st.c | |
| parent | 49925b79541ebca9430321ef843f57d95dec289a (diff) | |
| download | ruby-1338dcea730a2722cb8175baeb882ffcf3dfe7c2.tar.gz ruby-1338dcea730a2722cb8175baeb882ffcf3dfe7c2.tar.xz ruby-1338dcea730a2722cb8175baeb882ffcf3dfe7c2.zip | |
* lib/cgi.rb (CGI::Cookie): [ruby-talk:130040]
* object.c: [ruby-doc:818]
git-svn-id: http://svn.ruby-lang.org/repos/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 |
