urlmatch.h: use config_fn_t type

These are actually used as config callbacks, so use the typedef-ed type and make future refactors easier. Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Glen Choo committed Jun 28, 2023 at 19:26 UTC e0f9a51c327b54216f85f4569ea54da8a5092802
1 file changed +3 -2
urlmatch.h
+3 -2
@@ -2,6 +2,7 @@
2 #define URL_MATCH_H
3
4 #include "string-list.h"
5 +#include "config.h"
6
7 struct url_info {
8 /* normalized url on success, must be freed, otherwise NULL */
@@ -48,8 +49,8 @@ struct urlmatch_config {
49 const char *key;
50
51 void *cb;
51 - int (*collect_fn)(const char *var, const char *value, void *cb);
52 - int (*cascade_fn)(const char *var, const char *value, void *cb);
52 + config_fn_t collect_fn;
53 + config_fn_t cascade_fn;
54 /*
55 * Compare the two matches, the one just discovered and the existing
56 * best match and return a negative value if the found item is to be