Documentation update for NULL arguments.

This commit is contained in:
Philip.Hazel 2018-06-28 16:26:03 +00:00
parent 7e921fda05
commit 5a45a0712a
33 changed files with 826 additions and 756 deletions

View File

@ -25,7 +25,8 @@ SYNOPSIS
DESCRIPTION
</b><br>
<P>
This function frees the memory used for a compiled pattern, including any
If <i>code</i> is NULL, this function does nothing. Otherwise, <i>code</i> must
point to a compiled pattern. This function frees its memory, including any
memory used by the JIT compiler. If the compiled pattern was created by a call
to <b>pcre2_code_copy_with_tables()</b>, the memory for the character tables is
also freed.

View File

@ -27,7 +27,8 @@ DESCRIPTION
<P>
This function frees the memory occupied by a compile context, using the memory
freeing function from the general context with which it was created, or
<b>free()</b> if that was not set.
<b>free()</b> if that was not set. If the argument is NULL, the function returns
immediately without doing anything.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -28,7 +28,8 @@ DESCRIPTION
This function is part of an experimental set of pattern conversion functions.
It frees the memory occupied by a convert context, using the memory
freeing function from the general context with which it was created, or
<b>free()</b> if that was not set.
<b>free()</b> if that was not set. If the argument is NULL, the function returns
immediately without doing anything.
</P>
<P>
The pattern conversion functions are described in the

View File

@ -28,7 +28,8 @@ DESCRIPTION
This function is part of an experimental set of pattern conversion functions.
It frees the memory occupied by a converted pattern that was obtained by
calling <b>pcre2_pattern_convert()</b> with arguments that caused it to place
the converted pattern into newly obtained heap memory.
the converted pattern into newly obtained heap memory. If the argument is NULL,
the function returns immediately without doing anything.
</P>
<P>
The pattern conversion functions are described in the

View File

@ -26,7 +26,8 @@ DESCRIPTION
</b><br>
<P>
This function frees the memory occupied by a general context, using the memory
freeing function within the context, if set.
freeing function within the context, if set. If the argument is NULL, the
function returns immediately without doing anything.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -38,6 +38,10 @@ passed to a matching function. The arguments of this function are:
</PRE>
</P>
<P>
If <i>mcontext</i> is NULL, the function returns immediately, without doing
anything.
</P>
<P>
If <i>callback</i> is NULL and <i>callback_data</i> is NULL, an internal 32KiB
block on the machine stack is used.
</P>

View File

@ -26,8 +26,9 @@ DESCRIPTION
</b><br>
<P>
This function is used to free a JIT stack that was created by
<b>pcre2_jit_stack_create()</b> when it is no longer needed. For more details,
see the
<b>pcre2_jit_stack_create()</b> when it is no longer needed. If the argument is
NULL, the function returns immediately without doing anything. For more
details, see the
<a href="pcre2jit.html"><b>pcre2jit</b></a>
page.
</P>

View File

@ -27,7 +27,8 @@ DESCRIPTION
<P>
This function frees the memory occupied by a match context, using the memory
freeing function from the general context with which it was created, or
<b>free()</b> if that was not set.
<b>free()</b> if that was not set. If the argument is NULL, the function returns
immediately without doing anything.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -25,9 +25,10 @@ SYNOPSIS
DESCRIPTION
</b><br>
<P>
This function frees the memory occupied by a match data block, using the memory
freeing function from the general context or compiled pattern with which it was
created, or <b>free()</b> if that was not set.
If <i>match_data</i> is NULL, this function does nothing. Otherwise,
<i>match_data</i> must point to a match data block, which this function frees,
using the memory freeing function from the general context or compiled pattern
with which it was created, or <b>free()</b> if that was not set.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -27,7 +27,8 @@ DESCRIPTION
<P>
This function frees the memory that was obtained by
<b>pcre2_serialize_encode()</b> to hold a serialized byte stream. The argument
must point to such a byte stream.
must point to such a byte stream or be NULL, in which case the function returns
without doing anything.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -28,7 +28,7 @@ DESCRIPTION
This is a convenience function for freeing the memory obtained by a previous
call to <b>pcre2_substring_get_byname()</b> or
<b>pcre2_substring_get_bynumber()</b>. Its only argument is a pointer to the
string.
string. If the argument is NULL, the function does nothing.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -27,7 +27,8 @@ DESCRIPTION
<P>
This is a convenience function for freeing the store obtained by a previous
call to <b>pcre2substring_list_get()</b>. Its only argument is a pointer to
the list of string pointers.
the list of string pointers. If the argument is NULL, the function returns
immediately, without doing anything.
</P>
<P>
There is a complete description of the PCRE2 native API in the

View File

@ -518,7 +518,9 @@ been matched by <b>pcre2_match()</b>. They are:
<b>pcre2_substring_number_from_name()</b>
</pre>
<b>pcre2_substring_free()</b> and <b>pcre2_substring_list_free()</b> are also
provided, to free memory used for extracted strings.
provided, to free memory used for extracted strings. If either of these
functions is called with a NULL argument, the function returns immediately
without doing anything.
</P>
<P>
The function <b>pcre2_substitute()</b> can be called to match a pattern and
@ -727,6 +729,10 @@ The memory used for a general context should be freed by calling:
<br>
<br>
<b>void pcre2_general_context_free(pcre2_general_context *<i>gcontext</i>);</b>
<br>
<br>
If this function is passed a NULL argument, it function returns immediately
without doing anything.
<a name="compilecontext"></a></P>
<br><b>
The compile context
@ -1249,6 +1255,8 @@ If the compile context argument <i>ccontext</i> is NULL, memory for the compiled
pattern is obtained by calling <b>malloc()</b>. Otherwise, it is obtained from
the same memory function that was used for the compile context. The caller must
free the memory by calling <b>pcre2_code_free()</b> when it is no longer needed.
If <b>pcre2_code_free()</b> is called with a NULL argument, it returns
immediately, without doing anything.
</P>
<P>
The function <b>pcre2_code_copy()</b> makes a copy of the compiled code in new
@ -1257,7 +1265,8 @@ if the code has been processed by the JIT compiler (see
<a href="#jitcompiling">below),</a>
the JIT information cannot be copied (because it is position-dependent).
The new copy can initially be used only for non-JIT matching, though it can be
passed to <b>pcre2_jit_compile()</b> if required.
passed to <b>pcre2_jit_compile()</b> if required. If <b>pcre2_code_copy()</b> is
called with a NULL argument, it returns NULL.
</P>
<P>
The <b>pcre2_code_copy()</b> function provides a way for individual threads in a
@ -1272,7 +1281,9 @@ there are occasions when a copy of a compiled pattern and the relevant tables
are needed. The <b>pcre2_code_copy_with_tables()</b> provides this facility.
Copies of both the code and the tables are made, with the new code pointing to
the new tables. The memory for the new tables is automatically freed when
<b>pcre2_code_free()</b> is called for the new copy of the compiled code.
<b>pcre2_code_free()</b> is called for the new copy of the compiled code. If
<b>pcre2_code_copy_withy_tables()</b> is called with a NULL argument, it returns
NULL.
</P>
<P>
NOTE: When one of the matching functions is called, pointers to the compiled
@ -2363,7 +2374,8 @@ match data block (for that match) have taken place.
</P>
<P>
When a match data block itself is no longer needed, it should be freed by
calling <b>pcre2_match_data_free()</b>.
calling <b>pcre2_match_data_free()</b>. If this function is called with a NULL
argument, it returns immediately, without doing anything.
</P>
<br><a name="SEC27" href="#TOC1">MATCHING A PATTERN: THE TRADITIONAL FUNCTION</a><br>
<P>
@ -3619,7 +3631,7 @@ Cambridge, England.
</P>
<br><a name="SEC42" href="#TOC1">REVISION</a><br>
<P>
Last updated: 22 June 2018
Last updated: 28 June 2018
<br>
Copyright &copy; 1997-2018 University of Cambridge.
<br>

View File

@ -105,7 +105,8 @@ If <b>buffer</b> points to a NULL pointer, an output buffer is obtained using
the allocator in the context or <b>malloc()</b> if no context is supplied. A
pointer to this buffer is placed in the variable to which <b>buffer</b> points.
When no longer needed the output buffer must be freed by calling
<b>pcre2_converted_pattern_free()</b>.
<b>pcre2_converted_pattern_free()</b>. If this function is called with a NULL
argument, it returns immediately without doing anything.
</P>
<P>
If <b>buffer</b> points to a non-NULL pointer, <b>blength</b> must be set to the
@ -181,9 +182,9 @@ Cambridge, England.
</P>
<br><a name="SEC7" href="#TOC1">REVISION</a><br>
<P>
Last updated: 12 July 2017
Last updated: 28 June 2018
<br>
Copyright &copy; 1997-2017 University of Cambridge.
Copyright &copy; 1997-2018 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.

View File

@ -193,9 +193,10 @@ are a starting size, a maximum size, and a general context (for memory
allocation functions, or NULL for standard memory allocation). It returns a
pointer to an opaque structure of type <b>pcre2_jit_stack</b>, or NULL if there
is an error. The <b>pcre2_jit_stack_free()</b> function is used to free a stack
that is no longer needed. (For the technically minded: the address space is
allocated by mmap or VirtualAlloc.) A maximum stack size of 512KiB to 1MiB
should be more than enough for any pattern.
that is no longer needed. If its argument is NULL, this function returns
immediately, without doing anything. (For the technically minded: the address
space is allocated by mmap or VirtualAlloc.) A maximum stack size of 512KiB to
1MiB should be more than enough for any pattern.
</P>
<P>
The <b>pcre2_jit_stack_assign()</b> function specifies which stack JIT code
@ -207,7 +208,8 @@ should use. Its arguments are as follows:
</pre>
The first argument is a pointer to a match context. When this is subsequently
passed to a matching function, its information determines which JIT stack is
used. There are three cases for the values of the other two options:
used. If this argument is NULL, the function returns immediately, without doing
anything. There are three cases for the values of the other two options:
<pre>
(1) If <i>callback</i> is NULL and <i>data</i> is NULL, an internal 32KiB block
on the machine stack is used. This is the default when a match
@ -432,9 +434,9 @@ Cambridge, England.
</P>
<br><a name="SEC13" href="#TOC1">REVISION</a><br>
<P>
Last updated: 31 March 2017
Last updated: 28 June 2018
<br>
Copyright &copy; 1997-2017 University of Cambridge.
Copyright &copy; 1997-2018 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.

View File

@ -129,7 +129,9 @@ non-binary data, be sure that the file is opened for binary output.
Serializing a set of patterns leaves the original data untouched, so they can
still be used for matching. Their memory must eventually be freed in the usual
way by calling <b>pcre2_code_free()</b>. When you have finished with the byte
stream, it too must be freed by calling <b>pcre2_serialize_free()</b>.
stream, it too must be freed by calling <b>pcre2_serialize_free()</b>. If this
function is called with a NULL argument, it returns immediately without doing
anything.
</P>
<br><a name="SEC4" href="#TOC1">RE-USING PRECOMPILED PATTERNS</a><br>
<P>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
.TH PCRE2_CODE_FREE 3 "23 March 2017" "PCRE2 10.30"
.TH PCRE2_CODE_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -13,7 +13,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.SH DESCRIPTION
.rs
.sp
This function frees the memory used for a compiled pattern, including any
If \fIcode\fP is NULL, this function does nothing. Otherwise, \fIcode\fP must
point to a compiled pattern. This function frees its memory, including any
memory used by the JIT compiler. If the compiled pattern was created by a call
to \fBpcre2_code_copy_with_tables()\fP, the memory for the character tables is
also freed.

View File

@ -1,4 +1,4 @@
.TH PCRE2_COMPILE_CONTEXT_FREE 3 "22 October 2014" "PCRE2 10.00"
.TH PCRE2_COMPILE_CONTEXT_FREE 3 "29 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -15,7 +15,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.sp
This function frees the memory occupied by a compile context, using the memory
freeing function from the general context with which it was created, or
\fBfree()\fP if that was not set.
\fBfree()\fP if that was not set. If the argument is NULL, the function returns
immediately without doing anything.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_CONVERT_CONTEXT_FREE 3 "10 July 2017" "PCRE2 10.30"
.TH PCRE2_CONVERT_CONTEXT_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -16,7 +16,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
This function is part of an experimental set of pattern conversion functions.
It frees the memory occupied by a convert context, using the memory
freeing function from the general context with which it was created, or
\fBfree()\fP if that was not set.
\fBfree()\fP if that was not set. If the argument is NULL, the function returns
immediately without doing anything.
.P
The pattern conversion functions are described in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_CONVERTED_PATTERN_FREE 3 "11 July 2017" "PCRE2 10.30"
.TH PCRE2_CONVERTED_PATTERN_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -16,7 +16,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
This function is part of an experimental set of pattern conversion functions.
It frees the memory occupied by a converted pattern that was obtained by
calling \fBpcre2_pattern_convert()\fP with arguments that caused it to place
the converted pattern into newly obtained heap memory.
the converted pattern into newly obtained heap memory. If the argument is NULL,
the function returns immediately without doing anything.
.P
The pattern conversion functions are described in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_GENERAL_CONTEXT_FREE 3 "22 October 2014" "PCRE2 10.00"
.TH PCRE2_GENERAL_CONTEXT_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -14,7 +14,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.rs
.sp
This function frees the memory occupied by a general context, using the memory
freeing function within the context, if set.
freeing function within the context, if set. If the argument is NULL, the
function returns immediately without doing anything.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_JIT_STACK_ASSIGN 3 "08 November 2014" "PCRE2 10.0"
.TH PCRE2_JIT_STACK_ASSIGN 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -24,6 +24,9 @@ passed to a matching function. The arguments of this function are:
callback a callback function
callback_data a JIT stack or a value to be passed to the callback
.P
If \fImcontext\fP is NULL, the function returns immediately, without doing
anything.
.P
If \fIcallback\fP is NULL and \fIcallback_data\fP is NULL, an internal 32KiB
block on the machine stack is used.
.P

View File

@ -1,4 +1,4 @@
.TH PCRE2_JIT_STACK_FREE 3 "21 October 2014" "PCRE2 10.00"
.TH PCRE2_JIT_STACK_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -13,8 +13,9 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.rs
.sp
This function is used to free a JIT stack that was created by
\fBpcre2_jit_stack_create()\fP when it is no longer needed. For more details,
see the
\fBpcre2_jit_stack_create()\fP when it is no longer needed. If the argument is
NULL, the function returns immediately without doing anything. For more
details, see the
.\" HREF
\fBpcre2jit\fP
.\"

View File

@ -1,4 +1,4 @@
.TH PCRE2_MATCH_CONTEXT_FREE 3 "22 October 2014" "PCRE2 10.00"
.TH PCRE2_MATCH_CONTEXT_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -15,7 +15,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.sp
This function frees the memory occupied by a match context, using the memory
freeing function from the general context with which it was created, or
\fBfree()\fP if that was not set.
\fBfree()\fP if that was not set. If the argument is NULL, the function returns
immediately without doing anything.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_MATCH_DATA_FREE 3 "25 March 2017" "PCRE2 10.30"
.TH PCRE2_MATCH_DATA_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -13,9 +13,10 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.SH DESCRIPTION
.rs
.sp
This function frees the memory occupied by a match data block, using the memory
freeing function from the general context or compiled pattern with which it was
created, or \fBfree()\fP if that was not set.
If \fImatch_data\fP is NULL, this function does nothing. Otherwise,
\fImatch_data\fP must point to a match data block, which this function frees,
using the memory freeing function from the general context or compiled pattern
with which it was created, or \fBfree()\fP if that was not set.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -15,7 +15,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.sp
This function frees the memory that was obtained by
\fBpcre2_serialize_encode()\fP to hold a serialized byte stream. The argument
must point to such a byte stream.
must point to such a byte stream or be NULL, in which case the function returns
without doing anything.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_SUBSTRING_FREE 3 "21 October 2014" "PCRE2 10.00"
.TH PCRE2_SUBSTRING_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -15,7 +15,7 @@ PCRE2 - Perl-compatible regular expressions (revised API)
This is a convenience function for freeing the memory obtained by a previous
call to \fBpcre2_substring_get_byname()\fP or
\fBpcre2_substring_get_bynumber()\fP. Its only argument is a pointer to the
string.
string. If the argument is NULL, the function does nothing.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2_SUBSTRING_LIST_FREE 3 "21 October 2014" "PCRE2 10.00"
.TH PCRE2_SUBSTRING_LIST_FREE 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -14,7 +14,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.sp
This is a convenience function for freeing the store obtained by a previous
call to \fBpcre2substring_list_get()\fP. Its only argument is a pointer to
the list of string pointers.
the list of string pointers. If the argument is NULL, the function returns
immediately, without doing anything.
.P
There is a complete description of the PCRE2 native API in the
.\" HREF

View File

@ -1,4 +1,4 @@
.TH PCRE2API 3 "22 June 2018" "PCRE2 10.32"
.TH PCRE2API 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.sp
@ -453,7 +453,9 @@ been matched by \fBpcre2_match()\fP. They are:
\fBpcre2_substring_number_from_name()\fP
.sp
\fBpcre2_substring_free()\fP and \fBpcre2_substring_list_free()\fP are also
provided, to free memory used for extracted strings.
provided, to free memory used for extracted strings. If either of these
functions is called with a NULL argument, the function returns immediately
without doing anything.
.P
The function \fBpcre2_substitute()\fP can be called to match a pattern and
return a copy of the subject string with substitutions for parts that were
@ -666,6 +668,8 @@ The memory used for a general context should be freed by calling:
.B void pcre2_general_context_free(pcre2_general_context *\fIgcontext\fP);
.fi
.sp
If this function is passed a NULL argument, it function returns immediately
without doing anything.
.
.
.\" HTML <a name="compilecontext"></a>
@ -1178,6 +1182,8 @@ If the compile context argument \fIccontext\fP is NULL, memory for the compiled
pattern is obtained by calling \fBmalloc()\fP. Otherwise, it is obtained from
the same memory function that was used for the compile context. The caller must
free the memory by calling \fBpcre2_code_free()\fP when it is no longer needed.
If \fBpcre2_code_free()\fP is called with a NULL argument, it returns
immediately, without doing anything.
.P
The function \fBpcre2_code_copy()\fP makes a copy of the compiled code in new
memory, using the same memory allocator as was used for the original. However,
@ -1188,7 +1194,8 @@ below),
.\"
the JIT information cannot be copied (because it is position-dependent).
The new copy can initially be used only for non-JIT matching, though it can be
passed to \fBpcre2_jit_compile()\fP if required.
passed to \fBpcre2_jit_compile()\fP if required. If \fBpcre2_code_copy()\fP is
called with a NULL argument, it returns NULL.
.P
The \fBpcre2_code_copy()\fP function provides a way for individual threads in a
multithreaded application to acquire a private copy of shared compiled code.
@ -1205,7 +1212,9 @@ there are occasions when a copy of a compiled pattern and the relevant tables
are needed. The \fBpcre2_code_copy_with_tables()\fP provides this facility.
Copies of both the code and the tables are made, with the new code pointing to
the new tables. The memory for the new tables is automatically freed when
\fBpcre2_code_free()\fP is called for the new copy of the compiled code.
\fBpcre2_code_free()\fP is called for the new copy of the compiled code. If
\fBpcre2_code_copy_withy_tables()\fP is called with a NULL argument, it returns
NULL.
.P
NOTE: When one of the matching functions is called, pointers to the compiled
pattern and the subject string are set in the match data block so that they can
@ -2333,7 +2342,8 @@ free a compiled pattern or a subject string until after all operations on the
match data block (for that match) have taken place.
.P
When a match data block itself is no longer needed, it should be freed by
calling \fBpcre2_match_data_free()\fP.
calling \fBpcre2_match_data_free()\fP. If this function is called with a NULL
argument, it returns immediately, without doing anything.
.
.
.SH "MATCHING A PATTERN: THE TRADITIONAL FUNCTION"
@ -3627,6 +3637,6 @@ Cambridge, England.
.rs
.sp
.nf
Last updated: 22 June 2018
Last updated: 28 June 2018
Copyright (c) 1997-2018 University of Cambridge.
.fi

View File

@ -1,4 +1,4 @@
.TH PCRE2CONVERT 3 "12 July 2017" "PCRE2 10.30"
.TH PCRE2CONVERT 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH "EXPERIMENTAL PATTERN CONVERSION FUNCTIONS"
@ -83,7 +83,8 @@ If \fBbuffer\fP points to a NULL pointer, an output buffer is obtained using
the allocator in the context or \fBmalloc()\fP if no context is supplied. A
pointer to this buffer is placed in the variable to which \fBbuffer\fP points.
When no longer needed the output buffer must be freed by calling
\fBpcre2_converted_pattern_free()\fP.
\fBpcre2_converted_pattern_free()\fP. If this function is called with a NULL
argument, it returns immediately without doing anything.
.P
If \fBbuffer\fP points to a non-NULL pointer, \fBblength\fP must be set to the
actual length of the buffer provided (in code units).
@ -158,6 +159,6 @@ Cambridge, England.
.rs
.sp
.nf
Last updated: 12 July 2017
Copyright (c) 1997-2017 University of Cambridge.
Last updated: 28 June 2018
Copyright (c) 1997-2018 University of Cambridge.
.fi

View File

@ -1,4 +1,4 @@
.TH PCRE2JIT 3 "31 March 2017" "PCRE2 10.30"
.TH PCRE2JIT 3 "28 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH "PCRE2 JUST-IN-TIME COMPILER SUPPORT"
@ -177,9 +177,10 @@ are a starting size, a maximum size, and a general context (for memory
allocation functions, or NULL for standard memory allocation). It returns a
pointer to an opaque structure of type \fBpcre2_jit_stack\fP, or NULL if there
is an error. The \fBpcre2_jit_stack_free()\fP function is used to free a stack
that is no longer needed. (For the technically minded: the address space is
allocated by mmap or VirtualAlloc.) A maximum stack size of 512KiB to 1MiB
should be more than enough for any pattern.
that is no longer needed. If its argument is NULL, this function returns
immediately, without doing anything. (For the technically minded: the address
space is allocated by mmap or VirtualAlloc.) A maximum stack size of 512KiB to
1MiB should be more than enough for any pattern.
.P
The \fBpcre2_jit_stack_assign()\fP function specifies which stack JIT code
should use. Its arguments are as follows:
@ -190,7 +191,8 @@ should use. Its arguments are as follows:
.sp
The first argument is a pointer to a match context. When this is subsequently
passed to a matching function, its information determines which JIT stack is
used. There are three cases for the values of the other two options:
used. If this argument is NULL, the function returns immediately, without doing
anything. There are three cases for the values of the other two options:
.sp
(1) If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32KiB block
on the machine stack is used. This is the default when a match
@ -410,6 +412,6 @@ Cambridge, England.
.rs
.sp
.nf
Last updated: 31 March 2017
Copyright (c) 1997-2017 University of Cambridge.
Last updated: 28 June 2018
Copyright (c) 1997-2018 University of Cambridge.
.fi

View File

@ -114,7 +114,9 @@ non-binary data, be sure that the file is opened for binary output.
Serializing a set of patterns leaves the original data untouched, so they can
still be used for matching. Their memory must eventually be freed in the usual
way by calling \fBpcre2_code_free()\fP. When you have finished with the byte
stream, it too must be freed by calling \fBpcre2_serialize_free()\fP.
stream, it too must be freed by calling \fBpcre2_serialize_free()\fP. If this
function is called with a NULL argument, it returns immediately without doing
anything.
.
.
.SH "RE-USING PRECOMPILED PATTERNS"