Update documentation for scan_substring; also some code trailing space tidies

This commit is contained in:
Philip Hazel
2024-08-30 17:31:55 +01:00
parent bb2b1d03fd
commit 7a0eda1f66
18 changed files with 537 additions and 266 deletions

View File

@@ -34,11 +34,12 @@ documentation.
</P>
<P>
The availability of JIT support can be tested by calling
<b>pcre2_compile_jit()</b> with a NULL first argument and the single option
PCRE2_JIT_TEST_ALLOC. Such a call returns zero if JIT is available and has a
working allocator. Otherwise it returns PCRE2_ERROR_NOMEMORY if JIT is
available but cannot allocate executable memory, or PCRE2_ERROR_NULL if JIT
support is not compiled.
<b>pcre2_compile_jit()</b> with a single option PCRE2_JIT_TEST_ALLOC (the
code argument is ignored, so a NULL value is accepted). Such a call
returns zero if JIT is available and has a working allocator. Otherwise
it returns PCRE2_ERROR_NOMEMORY if JIT is available but cannot allocate
executable memory, or PCRE2_ERROR_JIT_UNSUPPORTED if JIT support is not
compiled.
</P>
<P>
Otherwise, the first argument must be a pointer that was returned by a
@@ -59,7 +60,8 @@ for success, or a negative error code otherwise. In particular,
PCRE2_ERROR_JIT_BADOPTION is returned if JIT is not supported or if an unknown
bit is set in <i>options</i>. The function can also return PCRE2_ERROR_NOMEMORY
if JIT is unable to allocate executable memory for the compiler, even if it was
because of a system security restriction.
because of a system security restriction. In a few cases, the function may
return with PCRE2_ERROR_JIT_UNSUPPORTED for unsupported features.
</P>
<P>
There is a complete description of the PCRE2 native API in the