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>
maint
Glen Choo 2023-06-28 19:26:21 +00:00 committed by Junio C Hamano
parent 97eeeea2dc
commit e0f9a51c32
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#define URL_MATCH_H #define URL_MATCH_H


#include "string-list.h" #include "string-list.h"
#include "config.h"


struct url_info { struct url_info {
/* normalized url on success, must be freed, otherwise NULL */ /* normalized url on success, must be freed, otherwise NULL */
@ -48,8 +49,8 @@ struct urlmatch_config {
const char *key; const char *key;


void *cb; void *cb;
int (*collect_fn)(const char *var, const char *value, void *cb); config_fn_t collect_fn;
int (*cascade_fn)(const char *var, const char *value, void *cb); config_fn_t cascade_fn;
/* /*
* Compare the two matches, the one just discovered and the existing * Compare the two matches, the one just discovered and the existing
* best match and return a negative value if the found item is to be * best match and return a negative value if the found item is to be