--- embedaddon/pcre/doc/html/pcreprecompile.html 2013/07/22 08:25:57 1.1.1.3 +++ embedaddon/pcre/doc/html/pcreprecompile.html 2014/06/15 19:46:05 1.1.1.4 @@ -102,8 +102,8 @@ study data.
RE-USING A PRECOMPILED PATTERN

Re-using a precompiled pattern is straightforward. Having reloaded it into main -memory, called pcre[16|32]_pattern_to_host_byte_order() if necessary, -you pass its pointer to pcre[16|32]_exec() or pcre[16|32]_dfa_exec() in +memory, called pcre[16|32]_pattern_to_host_byte_order() if necessary, you +pass its pointer to pcre[16|32]_exec() or pcre[16|32]_dfa_exec() in the usual way.

@@ -119,6 +119,11 @@ in the documentation.

+Warning: The tables that pcre_exec() and pcre_dfa_exec() use +must be the same as those that were used when the pattern was compiled. If this +is not the case, the behaviour is undefined. +

+

If you did not provide custom character tables when the pattern was compiled, the pointer in the compiled pattern is NULL, which causes the matching functions to use PCRE's internal tables. Thus, you do not need to take any @@ -126,9 +131,9 @@ special action at run time in this case.

If you saved study data with the compiled pattern, you need to create your own -pcre[16|32]_extra data block and set the study_data field to point to the -reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the -flags field to indicate that study data is present. Then pass the +pcre[16|32]_extra data block and set the study_data field to point +to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in +the flags field to indicate that study data is present. Then pass the pcre[16|32]_extra block to the matching function in the usual way. If the pattern was studied for just-in-time optimization, that data cannot be saved, and so is lost by a save/restore cycle. @@ -149,9 +154,9 @@ Cambridge CB2 3QH, England.


REVISION

-Last updated: 24 June 2012 +Last updated: 12 November 2013
-Copyright © 1997-2012 University of Cambridge. +Copyright © 1997-2013 University of Cambridge.

Return to the PCRE index page.