ViewVC logotype

Contents of /code/trunk/doc/pcre_assign_jit_stack.3

Parent Directory Parent Directory | Revision Log Revision Log

Revision 678 - (show annotations)
Sun Aug 28 15:23:03 2011 UTC (9 years, 3 months ago) by ph10
File size: 1570 byte(s)
Documentation for JIT support.
3 PCRE - Perl-compatible regular expressions
5 .rs
6 .sp
7 .B #include <pcre.h>
8 .PP
9 .SM
10 .B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
11 .ti +5n
12 .B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);
13 .
15 .rs
16 .sp
17 This function provides control over the memory used as a stack at runtime by a
18 call to \fBpcre_exec()\fP with a pattern that has been successfully compiled
19 with JIT optimization. The arguments are:
20 .sp
21 extra the data pointer returned by \fBpcre_study()\fP
22 callback a callback function
23 data a JIT stack or a value to be passed to the callback
24 function
25 .P
26 If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32K block on
27 the machine stack is used.
28 .P
29 If \fIcallback\fP is NULL and \fIdata\fP is not NULL, \fIdata\fP must
30 be a valid JIT stack, the result of calling \fBpcre_jit_stack_alloc()\fP.
31 .P
32 If \fIcallback\fP not NULL, it is called with \fIdata\fP as an argument at
33 the start of matching, in order to set up a JIT stack. If the result is NULL,
34 the internal 32K stack is used; otherwise the return value must be a valid JIT
35 stack, the result of calling \fBpcre_jit_stack_alloc()\fP.
36 .P
37 You may safely assign the same JIT stack to multiple patterns, as long as they
38 are all matched in the same thread. In a multithread application, each thread
39 must use its own JIT stack.
40 .P
41 There is a complete description of the PCRE native API in the
42 .\" HREF
43 \fBpcreapi\fP
44 .\"
45 page and a description of the POSIX API in the
46 .\" HREF
47 \fBpcreposix\fP
48 .\"
49 page.

  ViewVC Help
Powered by ViewVC 1.1.5