Add user data to recursion guard; get ready for RC1 (again)

This commit is contained in:
Philip.Hazel
2014-11-26 16:51:53 +00:00
parent d1f5dd5bf2
commit 9fcdf2cc6f
21 changed files with 362 additions and 313 deletions

View File

@@ -20,7 +20,7 @@ SYNOPSIS
</P>
<P>
<b>int pcre2_set_compile_recursion_guard(pcre2_compile_context *<i>ccontext</i>,</b>
<b> int (*<i>guard_function</i>)(uint32_t));</b>
<b> int (*<i>guard_function</i>)(uint32_t, void *), void *<i>user_data</i>);</b>
</P>
<br><b>
DESCRIPTION
@@ -28,11 +28,12 @@ DESCRIPTION
<P>
This function defines, within a compile context, a function that is called
whenever <b>pcre2_compile()</b> starts to compile a parenthesized part of a
pattern. The argument to the function gives the current depth of parenthesis
nesting. The function should return zero if all is well, or non-zero to force
an error. This feature is provided so that applications can check the available
system stack space, in order to avoid running out. The result of this function
is always zero.
pattern. The first argument to the function gives the current depth of
parenthesis nesting, and the second is user data that is supplied when the
function is set up. The callout function should return zero if all is well, or
non-zero to force an error. This feature is provided so that applications can
check the available system stack space, in order to avoid running out. The
result of <b>pcre2_set_compile_recursion_guard()</b> is always zero.
</P>
<P>
There is a complete description of the PCRE2 native API in the