| 1 |
ph10 |
678 |
.TH PCRE_ASSIGN_JIT_STACK 3 |
| 2 |
|
|
.SH NAME |
| 3 |
|
|
PCRE - Perl-compatible regular expressions |
| 4 |
|
|
.SH SYNOPSIS |
| 5 |
|
|
.rs |
| 6 |
|
|
.sp |
| 7 |
|
|
.B #include <pcre.h> |
| 8 |
|
|
.PP |
| 9 |
|
|
.SM |
| 10 |
ph10 |
691 |
.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP, |
| 11 |
ph10 |
678 |
.ti +5n |
| 12 |
|
|
.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP); |
| 13 |
ph10 |
868 |
.PP |
| 14 |
|
|
.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP, |
| 15 |
|
|
.ti +5n |
| 16 |
|
|
.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP); |
| 17 |
ph10 |
678 |
. |
| 18 |
|
|
.SH DESCRIPTION |
| 19 |
|
|
.rs |
| 20 |
|
|
.sp |
| 21 |
|
|
This function provides control over the memory used as a stack at runtime by a |
| 22 |
ph10 |
868 |
call to \fBpcre[16]_exec()\fP with a pattern that has been successfully |
| 23 |
|
|
compiled with JIT optimization. The arguments are: |
| 24 |
ph10 |
678 |
.sp |
| 25 |
ph10 |
868 |
extra the data pointer returned by \fBpcre[16]_study()\fP |
| 26 |
ph10 |
678 |
callback a callback function |
| 27 |
ph10 |
691 |
data a JIT stack or a value to be passed to the callback |
| 28 |
ph10 |
678 |
function |
| 29 |
|
|
.P |
| 30 |
|
|
If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32K block on |
| 31 |
|
|
the machine stack is used. |
| 32 |
|
|
.P |
| 33 |
|
|
If \fIcallback\fP is NULL and \fIdata\fP is not NULL, \fIdata\fP must |
| 34 |
ph10 |
868 |
be a valid JIT stack, the result of calling \fBpcre[16]_jit_stack_alloc()\fP. |
| 35 |
ph10 |
678 |
.P |
| 36 |
|
|
If \fIcallback\fP not NULL, it is called with \fIdata\fP as an argument at |
| 37 |
ph10 |
691 |
the start of matching, in order to set up a JIT stack. If the result is NULL, |
| 38 |
|
|
the internal 32K stack is used; otherwise the return value must be a valid JIT |
| 39 |
ph10 |
868 |
stack, the result of calling \fBpcre[16]_jit_stack_alloc()\fP. |
| 40 |
ph10 |
678 |
.P |
| 41 |
ph10 |
691 |
You may safely assign the same JIT stack to multiple patterns, as long as they |
| 42 |
|
|
are all matched in the same thread. In a multithread application, each thread |
| 43 |
ph10 |
683 |
must use its own JIT stack. For more details, see the |
| 44 |
|
|
.\" HREF |
| 45 |
|
|
\fBpcrejit\fP |
| 46 |
|
|
.\" |
| 47 |
|
|
page. |
| 48 |
ph10 |
678 |
.P |
| 49 |
|
|
There is a complete description of the PCRE native API in the |
| 50 |
|
|
.\" HREF |
| 51 |
|
|
\fBpcreapi\fP |
| 52 |
|
|
.\" |
| 53 |
|
|
page and a description of the POSIX API in the |
| 54 |
|
|
.\" HREF |
| 55 |
|
|
\fBpcreposix\fP |
| 56 |
|
|
.\" |
| 57 |
|
|
page. |