1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

hash.c: tbl_update_func

* hash.c (tbl_update_func): extract function typedef from the
  declaration of tbl_update.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-03-09 04:45:27 +00:00
parent e1e223a874
commit d000891e43

4
hash.c
View file

@ -487,8 +487,10 @@ struct update_arg {
VALUE old_value;
};
typedef int (*tbl_update_func)(st_data_t *, st_data_t *, st_data_t, int);
static int
tbl_update(VALUE hash, VALUE key, int (*func)(st_data_t *key, st_data_t *val, st_data_t arg, int existing), st_data_t optional_arg)
tbl_update(VALUE hash, VALUE key, tbl_update_func func, st_data_t optional_arg)
{
struct update_arg arg;
int result;