grep/pcre2: prepare to add debugging to pcre2_malloc()

Change pcre2_malloc() in a way that'll make it easier for a debugging
fprintf() to spew out the allocated pointer.

This doesn't introduce any functional change, it just makes a
subsequent commit's diff easier to read. Changes code added in
513f2b0bbd (grep: make PCRE2 aware of custom allocator, 2019-10-16).

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-02-18 01:07:22 +01:00 committed by Junio C Hamano
parent 47eebd2fd2
commit 588e4fb191

3
grep.c
View File

@ -45,7 +45,8 @@ static pcre2_general_context *pcre2_global_context;
static void *pcre2_malloc(PCRE2_SIZE size, MAYBE_UNUSED void *memory_data)
{
return malloc(size);
void *pointer = malloc(size);
return pointer;
}
static void pcre2_free(void *pointer, MAYBE_UNUSED void *memory_data)