]> git.kaiwu.me - njs.git/commitdiff
PCRE: removed unused context functions.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 9 Nov 2021 17:59:46 +0000 (17:59 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Tue, 9 Nov 2021 17:59:46 +0000 (17:59 +0000)
src/njs_pcre.c

index 2fafea7a393a93cf8cfe212d46a33dcce6ec48be..c7db1aefed411ec9d8a653add310e52b6304606f 100644 (file)
@@ -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)