man-pages/man3/pcre_assign_jit_stack.3.html
2021-03-31 01:06:50 +01:00

96 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE_ASSIGN_JIT_STACK</TITLE>
</HEAD><BODY>
<H1>PCRE_ASSIGN_JIT_STACK</H1>
Section: C Library Functions (3)<BR>Updated: 24 June 2012<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
PCRE - Perl-compatible regular expressions
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre.h">pcre.h</A>&gt;</B>
<P>
<PRE>
<B>void pcre_assign_jit_stack(pcre_extra *</B><I>extra</I>,
<B> pcre_jit_callback </B><I>callback</I>, void *<I>data</I>);
<B>void pcre16_assign_jit_stack(pcre16_extra *</B><I>extra</I>,
<B> pcre16_jit_callback </B><I>callback</I>, void *<I>data</I>);
<B>void pcre32_assign_jit_stack(pcre32_extra *</B><I>extra</I>,
<B> pcre32_jit_callback </B><I>callback</I>, void *<I>data</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This function provides control over the memory used as a stack at run-time by a
call to <B>pcre[16|32]_exec()</B> with a pattern that has been successfully
compiled with JIT optimization. The arguments are:
<P>
<BR>&nbsp;&nbsp;extra&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;data&nbsp;pointer&nbsp;returned&nbsp;by&nbsp;<B>pcre[16|32]_study()</B>
<BR>&nbsp;&nbsp;callback&nbsp;&nbsp;a&nbsp;callback&nbsp;function
<BR>&nbsp;&nbsp;data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;JIT&nbsp;stack&nbsp;or&nbsp;a&nbsp;value&nbsp;to&nbsp;be&nbsp;passed&nbsp;to&nbsp;the&nbsp;callback
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function
<P>
If <I>callback</I> is NULL and <I>data</I> is NULL, an internal 32K block on
the machine stack is used.
<P>
If <I>callback</I> is NULL and <I>data</I> is not NULL, <I>data</I> must
be a valid JIT stack, the result of calling <B>pcre[16|32]_jit_stack_alloc()</B>.
<P>
If <I>callback</I> not NULL, it is called with <I>data</I> as an argument at
the start of matching, in order to set up a JIT stack. If the result is NULL,
the internal 32K stack is used; otherwise the return value must be a valid JIT
stack, the result of calling <B>pcre[16|32]_jit_stack_alloc()</B>.
<P>
You may safely assign the same JIT stack to multiple patterns, as long as they
are all matched in the same thread. In a multithread application, each thread
must use its own JIT stack. For more details, see the
<B>pcrejit</B>
page.
<P>
There is a complete description of the PCRE native API in the
<B>pcreapi</B>
page and a description of the POSIX API in the
<B>pcreposix</B>
page.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:51 GMT, March 31, 2021
</BODY>
</HTML>