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

86 lines
2.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE2_JIT_COMPILE</TITLE>
</HEAD><BODY>
<H1>PCRE2_JIT_COMPILE</H1>
Section: C Library Functions (3)<BR>Updated: 29 July 2019<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>
PCRE2 - Perl-compatible regular expressions (revised API)
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre2.h">pcre2.h</A>&gt;</B>
<P>
<PRE>
<B>int pcre2_jit_compile(pcre2_code *</B><I>code</I>, uint32_t <I>options</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This function requests JIT compilation, which, if the just-in-time compiler is
available, further processes a compiled pattern into machine code that executes
much faster than the <B>pcre2_match()</B> interpretive matching function. Full
details are given in the
<B>pcre2jit</B>
documentation.
<P>
The first argument is a pointer that was returned by a successful call to
<B>pcre2_compile()</B>, and the second must contain one or more of the following
bits:
<P>
<BR>&nbsp;&nbsp;PCRE2_JIT_COMPLETE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;compile&nbsp;code&nbsp;for&nbsp;full&nbsp;matching
<BR>&nbsp;&nbsp;PCRE2_JIT_PARTIAL_SOFT&nbsp;&nbsp;compile&nbsp;code&nbsp;for&nbsp;soft&nbsp;partial&nbsp;matching
<BR>&nbsp;&nbsp;PCRE2_JIT_PARTIAL_HARD&nbsp;&nbsp;compile&nbsp;code&nbsp;for&nbsp;hard&nbsp;partial&nbsp;matching
<P>
There is also an obsolete option called PCRE2_JIT_INVALID_UTF, which has been
superseded by the <B>pcre2_compile()</B> option PCRE2_MATCH_INVALID_UTF. The old
option is deprecated and may be removed in the future.
<P>
The yield of the function is 0 for success, or a negative error code otherwise.
In particular, PCRE2_ERROR_JIT_BADOPTION is returned if JIT is not supported or
if an unknown bit is set in <I>options</I>. The function can also return
PCRE2_ERROR_NOMEMORY if JIT is unable to allocate executable memory for the
compiler, even if it was because of a system security restriction.
<P>
There is a complete description of the PCRE2 native API in the
<B>pcre2api</B>
page and a description of the POSIX API in the
<B>pcre2posix</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:50 GMT, March 31, 2021
</BODY>
</HTML>