From: Dmitry Volyntsev Date: Tue, 9 Nov 2021 17:59:46 +0000 (+0000) Subject: PCRE: removed unused context functions. X-Git-Tag: 0.7.1~50 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=005a8ae989ca694667548f5cca313cd106c9e8f7;p=njs.git PCRE: removed unused context functions. --- 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)