diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-07 10:52:53 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-05-07 13:28:29 +0000 |
commit | 35b25bc91784f5a39ee034a99167d5bfee49f74b (patch) | |
tree | f6198a2b9f4456c05f3399d60e95da57499b0036 /src/3rdparty/pcre2/src/pcre2_context.c | |
parent | aea6ff4f57135b0f2f076e86e22cb87c0a7014fe (diff) | |
parent | c2b553784dfbe0ece90f79709639e27e74359a7d (diff) |
Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev
Diffstat (limited to 'src/3rdparty/pcre2/src/pcre2_context.c')
-rw-r--r-- | src/3rdparty/pcre2/src/pcre2_context.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/3rdparty/pcre2/src/pcre2_context.c b/src/3rdparty/pcre2/src/pcre2_context.c index 2c14df0080..9c2886a6d0 100644 --- a/src/3rdparty/pcre2/src/pcre2_context.c +++ b/src/3rdparty/pcre2/src/pcre2_context.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2017 University of Cambridge + New API code Copyright (c) 2016-2018 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -163,11 +163,13 @@ when no context is supplied to a match function. */ const pcre2_match_context PRIV(default_match_context) = { { default_malloc, default_free, NULL }, #ifdef SUPPORT_JIT - NULL, - NULL, + NULL, /* JIT callback */ + NULL, /* JIT callback data */ #endif - NULL, - NULL, + NULL, /* Callout function */ + NULL, /* Callout data */ + NULL, /* Substitute callout function */ + NULL, /* Substitute callout data */ PCRE2_UNSET, /* Offset limit */ HEAP_LIMIT, MATCH_LIMIT, @@ -404,6 +406,16 @@ return 0; } PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION +pcre2_set_substitute_callout(pcre2_match_context *mcontext, + int (*substitute_callout)(pcre2_substitute_callout_block *, void *), + void *substitute_callout_data) +{ +mcontext->substitute_callout = substitute_callout; +mcontext->substitute_callout_data = substitute_callout_data; +return 0; +} + +PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION pcre2_set_heap_limit(pcre2_match_context *mcontext, uint32_t limit) { mcontext->heap_limit = limit; |