Thread (1 message) 1 message, 1 author, 2019-10-18

Re: [PATCH v2 2/3] grep: make PCRE2 aware of custom allocator

From: Junio C Hamano <hidden>
Date: 2019-10-18 01:38:38

"Carlo Marcelo Arenas Belón via GitGitGadget"
[off-list ref] writes:
 builtin/grep.c |  1 +
 grep.c         | 34 +++++++++++++++++++++++++++++++++-
 grep.h         |  1 +
 3 files changed, 35 insertions(+), 1 deletion(-)
 
+#if defined(USE_LIBPCRE2)
+	if (!pcre2_global_context)
+		pcre2_global_context = pcre2_general_context_create(
+					pcre2_malloc, pcre2_free, NULL);
+#endif
This part should use the same "#ifdef" as the other one which is a
minor nit, for consistency.  I do not care too deeply which way we
unify, but we should stick to one.
+
 #ifdef USE_LIBPCRE1
 	pcre_malloc = malloc;
 	pcre_free = free;
Other than that, all 3 patches look sensible, and they certainly got
simplified by dropping the conditional ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help