| 12 |
\fBpcre_maketables()\fP |
\fBpcre_maketables()\fP |
| 13 |
.\" |
.\" |
| 14 |
documentation), this is relatively straightforward. If you are using private |
documentation), this is relatively straightforward. If you are using private |
| 15 |
tables, it is a little bit more complicated. |
tables, it is a little bit more complicated. However, if you are using the |
| 16 |
|
just-in-time optimization feature of \fBpcre_study()\fP, it is not possible to |
| 17 |
|
save and reload the JIT data. |
| 18 |
.P |
.P |
| 19 |
If you save compiled patterns to a file, you can copy them to a different host |
If you save compiled patterns to a file, you can copy them to a different host |
| 20 |
and run them there. This works even if the new host has the opposite endianness |
and run them there. This works even if the new host has the opposite endianness |
| 21 |
to the one on which the patterns were compiled. There may be a small |
to the one on which the patterns were compiled. There may be a small |
| 22 |
performance penalty, but it should be insignificant. However, compiling regular |
performance penalty, but it should be insignificant. However, compiling regular |
| 23 |
expressions with one version of PCRE for use with a different version is not |
expressions with one version of PCRE for use with a different version is not |
| 24 |
guaranteed to work and may cause crashes. |
guaranteed to work and may cause crashes, and saving and restoring a compiled |
| 25 |
|
pattern loses any JIT optimization data. |
| 26 |
. |
. |
| 27 |
. |
. |
| 28 |
.SH "SAVING A COMPILED PATTERN" |
.SH "SAVING A COMPILED PATTERN" |
| 61 |
some daemon process that passes them via sockets to the processes that want |
some daemon process that passes them via sockets to the processes that want |
| 62 |
them. |
them. |
| 63 |
.P |
.P |
| 64 |
If the pattern has been studied, it is also possible to save the study data in |
If the pattern has been studied, it is also possible to save the normal study |
| 65 |
a similar way to the compiled pattern itself. When studying generates |
data in a similar way to the compiled pattern itself. However, if the |
| 66 |
additional information, \fBpcre_study()\fP returns a pointer to a |
PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is created cannot |
| 67 |
|
be saved because it is too dependent on the current environment. When studying |
| 68 |
|
generates additional information, \fBpcre_study()\fP returns a pointer to a |
| 69 |
\fBpcre_extra\fP data block. Its format is defined in the |
\fBpcre_extra\fP data block. Its format is defined in the |
| 70 |
.\" HTML <a href="pcreapi.html#extradata"> |
.\" HTML <a href="pcreapi.html#extradata"> |
| 71 |
.\" </a> |
.\" </a> |
| 116 |
reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the |
reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the |
| 117 |
\fIflags\fP field to indicate that study data is present. Then pass the |
\fIflags\fP field to indicate that study data is present. Then pass the |
| 118 |
\fBpcre_extra\fP block to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP in the |
\fBpcre_extra\fP block to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP in the |
| 119 |
usual way. |
usual way. If the pattern was studied for just-in-time optimization, that data |
| 120 |
|
cannot be saved, and so is lost by a save/restore cycle. |
| 121 |
. |
. |
| 122 |
. |
. |
| 123 |
.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES" |
.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES" |
| 142 |
.rs |
.rs |
| 143 |
.sp |
.sp |
| 144 |
.nf |
.nf |
| 145 |
Last updated: 17 November 2010 |
Last updated: 26 August 2011 |
| 146 |
Copyright (c) 1997-2010 University of Cambridge. |
Copyright (c) 1997-2011 University of Cambridge. |
| 147 |
.fi |
.fi |