/[pcre]/code/trunk/doc/html/pcreprecompile.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcreprecompile.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 75 by nigel, Sat Feb 24 21:40:37 2007 UTC revision 111 by ph10, Thu Mar 8 16:53:09 2007 UTC
# Line 17  man page, in case the conversion went wr Line 17  man page, in case the conversion went wr
17  <li><a name="TOC2" href="#SEC2">SAVING A COMPILED PATTERN</a>  <li><a name="TOC2" href="#SEC2">SAVING A COMPILED PATTERN</a>
18  <li><a name="TOC3" href="#SEC3">RE-USING A PRECOMPILED PATTERN</a>  <li><a name="TOC3" href="#SEC3">RE-USING A PRECOMPILED PATTERN</a>
19  <li><a name="TOC4" href="#SEC4">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a>  <li><a name="TOC4" href="#SEC4">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a>
20    <li><a name="TOC5" href="#SEC5">AUTHOR</a>
21    <li><a name="TOC6" href="#SEC6">REVISION</a>
22  </ul>  </ul>
23  <br><a name="SEC1" href="#TOC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a><br>  <br><a name="SEC1" href="#TOC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a><br>
24  <P>  <P>
# Line 88  return a non-NULL value before trying to Line 90  return a non-NULL value before trying to
90  <br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br>  <br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br>
91  <P>  <P>
92  Re-using a precompiled pattern is straightforward. Having reloaded it into main  Re-using a precompiled pattern is straightforward. Having reloaded it into main
93  memory, you pass its pointer to <b>pcre_exec()</b> in the usual way. This should  memory, you pass its pointer to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b> in
94  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
95  the one where the pattern was compiled.  the opposite endianness to the one where the pattern was compiled.
96  </P>  </P>
97  <P>  <P>
98  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
99  was compiled (the <i>tableptr</i> argument of <b>pcre_compile()</b>), you must  was compiled (the <i>tableptr</i> argument of <b>pcre_compile()</b>), you must
100  now pass a similar pointer to <b>pcre_exec()</b>, because the value saved with  now pass a similar pointer to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>,
101  the compiled pattern will obviously be nonsense. A field in a  because the value saved with the compiled pattern will obviously be nonsense. A
102  <b>pcre_extra()</b> block is used to pass this data, as described in the  field in a <b>pcre_extra()</b> block is used to pass this data, as described in
103    the
104  <a href="pcreapi.html#extradata">section on matching a pattern</a>  <a href="pcreapi.html#extradata">section on matching a pattern</a>
105  in the  in the
106  <a href="pcreapi.html"><b>pcreapi</b></a>  <a href="pcreapi.html"><b>pcreapi</b></a>
# Line 114  If you saved study data with the compile Line 117  If you saved study data with the compile
117  <b>pcre_extra</b> data block and set the <i>study_data</i> field to point to the  <b>pcre_extra</b> data block and set the <i>study_data</i> field to point to the
118  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
119  <i>flags</i> field to indicate that study data is present. Then pass the  <i>flags</i> field to indicate that study data is present. Then pass the
120  <b>pcre_extra</b> block to <b>pcre_exec()</b> in the usual way.  <b>pcre_extra</b> block to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b> in the
121    usual way.
122  </P>  </P>
123  <br><a name="SEC4" href="#TOC1">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a><br>  <br><a name="SEC4" href="#TOC1">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a><br>
124  <P>  <P>
125  The layout of the control block that is at the start of the data that makes up  The layout of the control block that is at the start of the data that makes up
126  a compiled pattern was changed for release 5.0. If you have any saved patterns  a compiled pattern was changed for release 5.0. If you have any saved patterns
127  that were compiled with previous releases (not a facility that was previously  that were compiled with previous releases (not a facility that was previously
128  advertised), you will have to recompile them for release 5.0. However, from now  advertised), you will have to recompile them for release 5.0 and above.
 on, it should be possible to make changes in a compabible manner.  
129  </P>  </P>
130  <P>  <P>
131  Last updated: 10 September 2004  If you have any saved patterns in UTF-8 mode that use \p or \P that were
132    compiled with any release up to and including 6.4, you will have to recompile
133    them for release 6.5 and above.
134    </P>
135    <P>
136    All saved patterns from earlier releases must be recompiled for release 7.0 or
137    higher, because there was an internal reorganization at that release.
138    </P>
139    <br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
140    <P>
141    Philip Hazel
142    <br>
143    University Computing Service
144    <br>
145    Cambridge CB2 3QH, England.
146    <br>
147    </P>
148    <br><a name="SEC6" href="#TOC1">REVISION</a><br>
149    <P>
150    Last updated: 06 March 2007
151    <br>
152    Copyright &copy; 1997-2007 University of Cambridge.
153  <br>  <br>
 Copyright &copy; 1997-2004 University of Cambridge.  
154  <p>  <p>
155  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.
156  </p>  </p>

Legend:
Removed from v.75  
changed lines
  Added in v.111

  ViewVC Help
Powered by ViewVC 1.1.5