[njs] PCRE: removed unused context functions.

Dmitry Volyntsev xeioex at nginx.com
Tue Nov 9 18:02:30 UTC 2021


details:   https://hg.nginx.org/njs/rev/384e1bb55a33
branches:  
changeset: 1740:384e1bb55a33
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue Nov 09 17:59:46 2021 +0000
description:
PCRE: removed unused context functions.

diffstat:

 src/njs_pcre.c |  21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)

diffs (45 lines):

diff -r 203bc61d8d70 -r 384e1bb55a33 src/njs_pcre.c
--- a/src/njs_pcre.c	Wed Nov 03 15:46:15 2021 +0000
+++ b/src/njs_pcre.c	Tue Nov 09 17:59:46 2021 +0000
@@ -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
 {
     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)


More information about the nginx-devel mailing list