mirror of
https://github.com/PCRE2Project/pcre2.git
synced 2025-10-19 19:44:08 +08:00
Add user data to recursion guard; get ready for RC1 (again)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user