-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new API function pcre2_set_optimization() for controlling enabled…
… optimizations It is anticipated that over time, more and more optimizations will be added to PCRE2, and we want to be able to switch optimizations off/on, both for testing purposes and to be able to work around bugs in a released library version. The number of free bits left in the compile options word is very small. Hence, we will start putting all optimization enable/disable flags in a separate word. To switch these off/on, the new API function pcre2_set_optimization() will be used. The values which can be passed to pcre2_set_optimization() are different from the internal flag bit values. The values accepted by pcre2_set_optimization() are contiguous integers, so there is no danger of ever running out of them. This means in the future, the internal representation can be changed at any time without breaking backwards compatibility. Further, the 'directives' passed to pcre2_set_optimization() are not restricted to control a single, specific optimization. As an example, passing PCRE2_OPTIMIZATION_FULL will turn on all optimizations supported by whatever version of PCRE2 the client program happens to be linked with. Co-Authored-By: Carlo Marcelo Arenas Belón <carenas@gmail.com> Co-Authored-by: Zoltan Herczeg <hzmester@freemail.hu>
- Loading branch information
1 parent
5e75d9b
commit e4785f4
Showing
25 changed files
with
999 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<html> | ||
<head> | ||
<title>pcre2_set_optimize specification</title> | ||
</head> | ||
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB"> | ||
<h1>pcre2_set_optimize man page</h1> | ||
<p> | ||
Return to the <a href="index.html">PCRE2 index page</a>. | ||
</p> | ||
<p> | ||
This page is part of the PCRE2 HTML documentation. It was generated | ||
automatically from the original man page. If there is any nonsense in it, | ||
please consult the man page, in case the conversion went wrong. | ||
<br> | ||
<br><b> | ||
SYNOPSIS | ||
</b><br> | ||
<P> | ||
<b>#include <pcre2.h></b> | ||
</P> | ||
<P> | ||
<b>int pcre2_set_optimize(pcre2_compile_context *<i>ccontext</i>,</b> | ||
<b> uint32_t <i>directive</i>);</b> | ||
</P> | ||
<br><b> | ||
DESCRIPTION | ||
</b><br> | ||
<P> | ||
This function controls which performance optimizations will be applied | ||
by <b>pcre2_compile</b>. It can be called multiple times with the same compile | ||
context; the effects are cumulative, with the effects of later calls taking | ||
precedence over earlier ones. | ||
</P> | ||
<P> | ||
The result is zero for success, PCRE2_ERROR_NULL if <i>ccontext</i> is NULL, | ||
or PCRE2_ERROR_BADOPTION if <i>directive</i> is unknown. This can be used to | ||
detect when the available version of PCRE2 does not implement a certain | ||
optimization. | ||
</P> | ||
<P> | ||
There is a complete description of the PCRE2 native API, including all | ||
permitted values for the <i>directive</i> parameter of <b>pcre2_set_optimize</b>, | ||
in the | ||
<a href="pcre2api.html"><b>pcre2api</b></a> | ||
page.<p> | ||
Return to the <a href="index.html">PCRE2 index page</a>. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.