From 005a8ae989ca694667548f5cca313cd106c9e8f7 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Tue, 9 Nov 2021 17:59:46 +0000 Subject: [PATCH] PCRE: removed unused context functions. --- src/njs_pcre.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/njs_pcre.c b/src/njs_pcre.c index 2fafea7a..c7db1aef 100644 --- a/src/njs_pcre.c +++ b/src/njs_pcre.c @@ -10,8 +10,6 @@ static void *njs_pcre_malloc(size_t size); static void njs_pcre_free(void *p); -static void *njs_pcre_default_malloc(size_t size, void *memory_data); -static void njs_pcre_default_free(void *p, void *memory_data); static njs_regex_context_t *regex_context; @@ -23,11 +21,6 @@ njs_regex_context_create(njs_pcre_malloc_t private_malloc, { njs_regex_context_t *ctx; - if (private_malloc == NULL) { - private_malloc = njs_pcre_default_malloc; - private_free = njs_pcre_default_free; - } - ctx = private_malloc(sizeof(njs_regex_context_t), memory_data); if (njs_fast_path(ctx != NULL)) { @@ -263,20 +256,6 @@ njs_pcre_free(void *p) } -static void * -njs_pcre_default_malloc(size_t size, void *memory_data) -{ - return malloc(size); -} - - -static void -njs_pcre_default_free(void *p, void *memory_data) -{ - free(p); -} - - njs_int_t njs_regex_match(njs_regex_t *regex, const u_char *subject, size_t off, size_t len, njs_regex_match_data_t *match_data, njs_regex_context_t *ctx) -- 2.47.3