diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-26 16:06:40 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-27 15:52:26 +0900 |
commit | 6dd60cf114701f1ff3526381c0e742c588af2f91 (patch) | |
tree | d3552b145f9b5153c470ad7e3cf560c0dd5c552e /include/ruby | |
parent | e3fc30564e9466d6926f9d25a090dcf787bd5c33 (diff) | |
download | ruby-6dd60cf114701f1ff3526381c0e742c588af2f91.tar.gz |
st_foreach now free from ANYARGS
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct. This commit deletes ANYARGS from
st_foreach. I strongly believe that this commit should have had come
with b0af0592fdd9e9d4e4b863fde006d67ccefeac21, which added extra
parameter to st_foreach callbacks.
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/st.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h index a7eb0c6d7c..9b48d514a9 100644 --- a/include/ruby/st.h +++ b/include/ruby/st.h @@ -118,9 +118,11 @@ typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t * results of hash() are same and compare() returns 0, otherwise the * behavior is undefined */ int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg); -int st_foreach_with_replace(st_table *tab, int (*func)(ANYARGS), st_update_callback_func *replace, st_data_t arg); -int st_foreach(st_table *, int (*)(ANYARGS), st_data_t); -int st_foreach_check(st_table *, int (*)(ANYARGS), st_data_t, st_data_t); +typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t); +typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int); +int st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg); +int st_foreach(st_table *, st_foreach_callback_func *, st_data_t); +int st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t); st_index_t st_keys(st_table *table, st_data_t *keys, st_index_t size); st_index_t st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never); st_index_t st_values(st_table *table, st_data_t *values, st_index_t size); |