From 1338dcea730a2722cb8175baeb882ffcf3dfe7c2 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 8 Feb 2005 00:51:16 +0000 Subject: * 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 --- st.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'st.c') diff --git a/st.c b/st.c index 12ed40114..69ff6ef5a 100644 --- a/st.c +++ b/st.c @@ -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 -- cgit