diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-26 00:47:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-26 00:47:10 +0000 |
commit | 38cfb957dd74948b5b18ead36ac6cac494b9c423 (patch) | |
tree | ce696aa8f631f1a7bca93bdde7ec03b1e356b42e /id_table.h | |
parent | 86fd28d11ec50f7073c0715b84a7ba90f00ce0b7 (diff) |
id_table.h: callback function types
* id_table.h (rb_id_table_foreach_func_t): define callback
function type for rb_id_table_foreach().
* id_table.h (rb_id_table_foreach_values_func_t): ditto for
rb_id_table_foreach_values().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'id_table.h')
-rw-r--r-- | id_table.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/id_table.h b/id_table.h index 503842f250..0b1b119b84 100644 --- a/id_table.h +++ b/id_table.h @@ -19,5 +19,8 @@ size_t rb_id_table_memsize(struct rb_id_table *tbl); int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val); int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp); int rb_id_table_delete(struct rb_id_table *tbl, ID id); -void rb_id_table_foreach(struct rb_id_table *tbl, enum rb_id_table_iterator_result (*func)(ID id, VALUE val, void *data), void *data); -void rb_id_table_foreach_values(struct rb_id_table *tbl, enum rb_id_table_iterator_result (*func)(VALUE val, void *data), void *data); + +typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data); +typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data); +void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data); +void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data); |