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;
{
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)) {
}
-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)