xdiff-interface: prepare for allowing early return

Change the function prototype of xdiff_emit_line_fn to return an "int"
instead of "void". Change all of those functions to "return 0",
nothing checks those return values yet, and no behavior is being
changed.

In subsequent commits the interface will be changed to allow early
return via this new return value.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2021-04-12 19:15:24 +02:00
committed by Junio C Hamano
parent 5b0672a26e
commit a8d5eb6dc0
6 changed files with 27 additions and 19 deletions

View File

@ -274,9 +274,10 @@ static void find_exact_matches(struct string_list *a, struct string_list *b)
hashmap_clear(&map);
}
static void diffsize_consume(void *data, char *line, unsigned long len)
static int diffsize_consume(void *data, char *line, unsigned long len)
{
(*(int *)data)++;
return 0;
}
static void diffsize_hunk(void *data, long ob, long on, long nb, long nn,