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 /regparse.c | |
parent | e3fc30564e9466d6926f9d25a090dcf787bd5c33 (diff) |
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 'regparse.c')
-rw-r--r-- | regparse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/regparse.c b/regparse.c index 574a07e05d..5f118900de 100644 --- a/regparse.c +++ b/regparse.c @@ -493,7 +493,7 @@ onig_print_names(FILE* fp, regex_t* reg) if (IS_NOT_NULL(t)) { fprintf(fp, "name table\n"); - onig_st_foreach(t, i_print_name_entry, (HashDataType )fp); + onig_st_foreach(t, (st_foreach_callback_func *)i_print_name_entry, (HashDataType )fp); fputs("\n", fp); } return 0; @@ -516,7 +516,7 @@ names_clear(regex_t* reg) NameTable* t = (NameTable* )reg->name_table; if (IS_NOT_NULL(t)) { - onig_st_foreach(t, i_free_name_entry, 0); + onig_st_foreach(t, (st_foreach_callback_func *)i_free_name_entry, 0); } return 0; } @@ -585,7 +585,7 @@ onig_foreach_name(regex_t* reg, narg.reg = reg; narg.arg = arg; narg.enc = reg->enc; /* should be pattern encoding. */ - onig_st_foreach(t, i_names, (HashDataType )&narg); + onig_st_foreach(t, (st_foreach_callback_func *)i_names, (HashDataType )&narg); } return narg.ret; } @@ -613,7 +613,7 @@ onig_renumber_name_table(regex_t* reg, GroupNumRemap* map) NameTable* t = (NameTable* )reg->name_table; if (IS_NOT_NULL(t)) { - onig_st_foreach(t, i_renumber_name, (HashDataType )map); + onig_st_foreach(t, (st_foreach_callback_func *)i_renumber_name, (HashDataType )map); } return 0; } |