blob: bbf5ebd02650211f83bc676fd06961db8022645d [file] [log] [blame]
Tristan Matthews04616462013-11-14 16:09:34 -05001<html>
2<head>
3<title>pcre_assign_jit_stack specification</title>
4</head>
5<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6<h1>pcre_assign_jit_stack man page</h1>
7<p>
8Return to the <a href="index.html">PCRE index page</a>.
9</p>
10<p>
11This page is part of the PCRE HTML documentation. It was generated automatically
12from the original man page. If there is any nonsense in it, please consult the
13man page, in case the conversion went wrong.
14<br>
15<br><b>
16SYNOPSIS
17</b><br>
18<P>
19<b>#include &#60;pcre.h&#62;</b>
20</P>
21<P>
22<b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b>
23<b>pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
24</P>
25<br><b>
26DESCRIPTION
27</b><br>
28<P>
29This function provides control over the memory used as a stack at runtime by a
30call to <b>pcre_exec()</b> with a pattern that has been successfully compiled
31with JIT optimization. The arguments are:
32<pre>
33 extra the data pointer returned by <b>pcre_study()</b>
34 callback a callback function
35 data a JIT stack or a value to be passed to the callback
36 function
37</PRE>
38</P>
39<P>
40If <i>callback</i> is NULL and <i>data</i> is NULL, an internal 32K block on
41the machine stack is used.
42</P>
43<P>
44If <i>callback</i> is NULL and <i>data</i> is not NULL, <i>data</i> must
45be a valid JIT stack, the result of calling <b>pcre_jit_stack_alloc()</b>.
46</P>
47<P>
48If <i>callback</i> not NULL, it is called with <i>data</i> as an argument at
49the start of matching, in order to set up a JIT stack. If the result is NULL,
50the internal 32K stack is used; otherwise the return value must be a valid JIT
51stack, the result of calling <b>pcre_jit_stack_alloc()</b>.
52</P>
53<P>
54You may safely assign the same JIT stack to multiple patterns, as long as they
55are all matched in the same thread. In a multithread application, each thread
56must use its own JIT stack. For more details, see the
57<a href="pcrejit.html"><b>pcrejit</b></a>
58page.
59</P>
60<P>
61There is a complete description of the PCRE native API in the
62<a href="pcreapi.html"><b>pcreapi</b></a>
63page and a description of the POSIX API in the
64<a href="pcreposix.html"><b>pcreposix</b></a>
65page.
66<p>
67Return to the <a href="index.html">PCRE index page</a>.
68</p>