• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<title>pcre2_jit_stack_assign specification</title>
4</head>
5<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6<h1>pcre2_jit_stack_assign man page</h1>
7<p>
8Return to the <a href="index.html">PCRE2 index page</a>.
9</p>
10<p>
11This page is part of the PCRE2 HTML documentation. It was generated
12automatically from the original man page. If there is any nonsense in it,
13please consult the man page, in case the conversion went wrong.
14<br>
15<br><b>
16SYNOPSIS
17</b><br>
18<P>
19<b>#include &#60;pcre2.h&#62;</b>
20</P>
21<P>
22<b>void pcre2_jit_stack_assign(pcre2_match_context *<i>mcontext</i>,</b>
23<b>  pcre2_jit_callback <i>callback_function</i>, void *<i>callback_data</i>);</b>
24</P>
25<br><b>
26DESCRIPTION
27</b><br>
28<P>
29This function provides control over the memory used by JIT as a run-time stack
30when <b>pcre2_match()</b> or <b>pcre2_jit_match()</b> is called with a pattern
31that has been successfully processed by the JIT compiler. The information that
32determines which stack is used is put into a match context that is subsequently
33passed to a matching function. The arguments of this function are:
34<pre>
35  mcontext       a pointer to a match context
36  callback       a callback function
37  callback_data  a JIT stack or a value to be passed to the callback
38</PRE>
39</P>
40<P>
41If <i>callback</i> is NULL and <i>callback_data</i> is NULL, an internal 32K
42block on the machine stack is used.
43</P>
44<P>
45If <i>callback</i> is NULL and <i>callback_data</i> is not NULL,
46<i>callback_data</i> must be a valid JIT stack, the result of calling
47<b>pcre2_jit_stack_create()</b>.
48</P>
49<P>
50If <i>callback</i> not NULL, it is called with <i>callback_data</i> as an
51argument at the start of matching, in order to set up a JIT stack. If the
52result is NULL, the internal 32K stack is used; otherwise the return value must
53be a valid JIT stack, the result of calling <b>pcre2_jit_stack_create()</b>.
54</P>
55<P>
56You may safely use the same JIT stack for multiple patterns, as long as they
57are all matched in the same thread. In a multithread application, each thread
58must use its own JIT stack. For more details, see the
59<a href="pcre2jit.html"><b>pcre2jit</b></a>
60page.
61</P>
62<P>
63There is a complete description of the PCRE2 native API in the
64<a href="pcre2api.html"><b>pcre2api</b></a>
65page and a description of the POSIX API in the
66<a href="pcre2posix.html"><b>pcre2posix</b></a>
67page.
68<p>
69Return to the <a href="index.html">PCRE2 index page</a>.
70</p>
71