| 79 |
.rs |
.rs |
| 80 |
.sp |
.sp |
| 81 |
Re-using a precompiled pattern is straightforward. Having reloaded it into main |
Re-using a precompiled pattern is straightforward. Having reloaded it into main |
| 82 |
memory, you pass its pointer to \fBpcre_exec()\fP in the usual way. This should |
memory, you pass its pointer to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP in |
| 83 |
work even on another host, and even if that host has the opposite endianness to |
the usual way. This should work even on another host, and even if that host has |
| 84 |
the one where the pattern was compiled. |
the opposite endianness to the one where the pattern was compiled. |
| 85 |
.P |
.P |
| 86 |
However, if you passed a pointer to custom character tables when the pattern |
However, if you passed a pointer to custom character tables when the pattern |
| 87 |
was compiled (the \fItableptr\fP argument of \fBpcre_compile()\fP), you must |
was compiled (the \fItableptr\fP argument of \fBpcre_compile()\fP), you must |
| 88 |
now pass a similar pointer to \fBpcre_exec()\fP, because the value saved with |
now pass a similar pointer to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP, |
| 89 |
the compiled pattern will obviously be nonsense. A field in a |
because the value saved with the compiled pattern will obviously be nonsense. A |
| 90 |
\fBpcre_extra()\fP block is used to pass this data, as described in the |
field in a \fBpcre_extra()\fP block is used to pass this data, as described in |
| 91 |
|
the |
| 92 |
.\" HTML <a href="pcreapi.html#extradata"> |
.\" HTML <a href="pcreapi.html#extradata"> |
| 93 |
.\" </a> |
.\" </a> |
| 94 |
section on matching a pattern |
section on matching a pattern |
| 108 |
\fBpcre_extra\fP data block and set the \fIstudy_data\fP field to point to the |
\fBpcre_extra\fP data block and set the \fIstudy_data\fP field to point to the |
| 109 |
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 |
| 110 |
\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 |
| 111 |
\fBpcre_extra\fP block to \fBpcre_exec()\fP in the usual way. |
\fBpcre_extra\fP block to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP in the |
| 112 |
|
usual way. |
| 113 |
. |
. |
| 114 |
. |
. |
| 115 |
.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES" |
.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES" |
| 122 |
on, it should be possible to make changes in a compabible manner. |
on, it should be possible to make changes in a compabible manner. |
| 123 |
.P |
.P |
| 124 |
.in 0 |
.in 0 |
| 125 |
Last updated: 10 September 2004 |
Last updated: 28 February 2005 |
| 126 |
.br |
.br |
| 127 |
Copyright (c) 1997-2004 University of Cambridge. |
Copyright (c) 1997-2005 University of Cambridge. |