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

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

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

revision 1055 by chpe, Tue Oct 16 15:53:30 2012 UTC revision 1400 by ph10, Tue Nov 12 17:05:55 2013 UTC
# Line 1  Line 1 
1  .TH PCREPRECOMPILE 3 "24 June 2012" "PCRE 8.30"  .TH PCREPRECOMPILE 3 "12 November 2013" "PCRE 8.34"
2  .SH NAME  .SH NAME
3  PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
4  .SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"  .SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"
# Line 90  study data. Line 90  study data.
90  .rs  .rs
91  .sp  .sp
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, called \fBpcre[16|32]_pattern_to_host_byte_order()\fP if necessary,  memory, called \fBpcre[16|32]_pattern_to_host_byte_order()\fP if necessary, you
94  you pass its pointer to \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP in  pass its pointer to \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP in
95  the usual way.  the usual way.
96  .P  .P
97  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
# Line 110  in the Line 110  in the
110  .\"  .\"
111  documentation.  documentation.
112  .P  .P
113    \fBWarning:\fP The tables that \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP use
114    must be the same as those that were used when the pattern was compiled. If this
115    is not the case, the behaviour is undefined.
116    .P
117  If you did not provide custom character tables when the pattern was compiled,  If you did not provide custom character tables when the pattern was compiled,
118  the pointer in the compiled pattern is NULL, which causes the matching  the pointer in the compiled pattern is NULL, which causes the matching
119  functions to use PCRE's internal tables. Thus, you do not need to take any  functions to use PCRE's internal tables. Thus, you do not need to take any
120  special action at run time in this case.  special action at run time in this case.
121  .P  .P
122  If you saved study data with the compiled pattern, you need to create your own  If you saved study data with the compiled pattern, you need to create your own
123  \fBpcre[16|32]_extra\fP data block and set the \fIstudy_data\fP field to point to the  \fBpcre[16|32]_extra\fP data block and set the \fIstudy_data\fP field to point
124  reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the  to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in
125  \fIflags\fP field to indicate that study data is present. Then pass the  the \fIflags\fP field to indicate that study data is present. Then pass the
126  \fBpcre[16|32]_extra\fP block to the matching function in the usual way. If the  \fBpcre[16|32]_extra\fP block to the matching function in the usual way. If the
127  pattern was studied for just-in-time optimization, that data cannot be saved,  pattern was studied for just-in-time optimization, that data cannot be saved,
128  and so is lost by a save/restore cycle.  and so is lost by a save/restore cycle.
# Line 146  Cambridge CB2 3QH, England. Line 150  Cambridge CB2 3QH, England.
150  .rs  .rs
151  .sp  .sp
152  .nf  .nf
153  Last updated: 24 June 2012  Last updated: 12 November 2013
154  Copyright (c) 1997-2012 University of Cambridge.  Copyright (c) 1997-2013 University of Cambridge.
155  .fi  .fi

Legend:
Removed from v.1055  
changed lines
  Added in v.1400

  ViewVC Help
Powered by ViewVC 1.1.5