34 |
fully tested. If --enable-jit is set on an unsupported platform, compilation |
fully tested. If --enable-jit is set on an unsupported platform, compilation |
35 |
fails. |
fails. |
36 |
.P |
.P |
37 |
A program can tell if JIT support is available by calling \fBpcre_config()\fP |
A program that is linked with PCRE 8.20 or later can tell if JIT support is |
38 |
with the PCRE_CONFIG_JIT option. The result is 1 when JIT is available, and 0 |
available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The |
39 |
otherwise. However, a simple program does not need to check this in order to |
result is 1 when JIT is available, and 0 otherwise. However, a simple program |
40 |
use JIT. The API is implemented in a way that falls back to the ordinary PCRE |
does not need to check this in order to use JIT. The API is implemented in a |
41 |
code if JIT is not available. |
way that falls back to the ordinary PCRE code if JIT is not available. |
42 |
|
.P |
43 |
|
If your program may sometimes be linked with versions of PCRE that are older |
44 |
|
than 8.20, but you want to use JIT when it is available, you can test |
45 |
|
the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such |
46 |
|
as PCRE_CONFIG_JIT, for compile-time control of your code. |
47 |
. |
. |
48 |
. |
. |
49 |
.SH "SIMPLE USE OF JIT" |
.SH "SIMPLE USE OF JIT" |
59 |
no longer needed instead of just freeing it yourself. This |
no longer needed instead of just freeing it yourself. This |
60 |
ensures that any JIT data is also freed. |
ensures that any JIT data is also freed. |
61 |
.sp |
.sp |
62 |
|
For a program that may be linked with pre-8.20 versions of PCRE, you can insert |
63 |
|
.sp |
64 |
|
#ifndef PCRE_STUDY_JIT_COMPILE |
65 |
|
#define PCRE_STUDY_JIT_COMPILE 0 |
66 |
|
#endif |
67 |
|
.sp |
68 |
|
so that no option is passed to \fBpcre_study()\fP, and then use something like |
69 |
|
this to free the study data: |
70 |
|
.sp |
71 |
|
#ifdef PCRE_CONFIG_JIT |
72 |
|
pcre_free_study(study_ptr); |
73 |
|
#else |
74 |
|
pcre_free(study_ptr); |
75 |
|
#endif |
76 |
|
.sp |
77 |
In some circumstances you may need to call additional functions. These are |
In some circumstances you may need to call additional functions. These are |
78 |
described in the section entitled |
described in the section entitled |
79 |
.\" HTML <a href="#stackcontrol"> |
.\" HTML <a href="#stackcontrol"> |
115 |
.P |
.P |
116 |
The unsupported pattern items are: |
The unsupported pattern items are: |
117 |
.sp |
.sp |
118 |
\eC match a single byte; not supported in UTF-8 mode |
\eC match a single byte; not supported in UTF-8 mode |
119 |
(?Cn) callouts |
(?Cn) callouts |
120 |
(*COMMIT) ) |
(*COMMIT) ) |
121 |
(*MARK) ) |
(*MARK) ) |
357 |
.rs |
.rs |
358 |
.sp |
.sp |
359 |
.nf |
.nf |
360 |
Last updated: 22 November 2011 |
Last updated: 26 November 2011 |
361 |
Copyright (c) 1997-2011 University of Cambridge. |
Copyright (c) 1997-2011 University of Cambridge. |
362 |
.fi |
.fi |