/[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 76 by nigel, Sat Feb 24 21:40:37 2007 UTC revision 77 by nigel, Sat Feb 24 21:40:45 2007 UTC
# Line 88  return a non-NULL value before trying to Line 88  return a non-NULL value before trying to
88  <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>
89  <P>  <P>
90  Re-using a precompiled pattern is straightforward. Having reloaded it into main  Re-using a precompiled pattern is straightforward. Having reloaded it into main
91  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
92  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
93  the one where the pattern was compiled.  the opposite endianness to the one where the pattern was compiled.
94  </P>  </P>
95  <P>  <P>
96  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
97  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
98  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>,
99  the compiled pattern will obviously be nonsense. A field in a  because the value saved with the compiled pattern will obviously be nonsense. A
100  <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
101    the
102  <a href="pcreapi.html#extradata">section on matching a pattern</a>  <a href="pcreapi.html#extradata">section on matching a pattern</a>
103  in the  in the
104  <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 115  If you saved study data with the compile
115  <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
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  <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
118  <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
119    usual way.
120  </P>  </P>
121  <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>
122  <P>  <P>
# Line 125  advertised), you will have to recompile Line 127  advertised), you will have to recompile
127  on, it should be possible to make changes in a compabible manner.  on, it should be possible to make changes in a compabible manner.
128  </P>  </P>
129  <P>  <P>
130  Last updated: 10 September 2004  Last updated: 28 February 2005
131  <br>  <br>
132  Copyright &copy; 1997-2004 University of Cambridge.  Copyright &copy; 1997-2005 University of Cambridge.
133  <p>  <p>
134  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.
135  </p>  </p>

Legend:
Removed from v.76  
changed lines
  Added in v.77

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12