From 5dced99eaeb73861f1977bf7a80f851c97c8e7c1 Mon Sep 17 00:00:00 2001 From: ph10 Date: Thu, 3 Dec 2015 17:19:13 +0000 Subject: [PATCH] Documentation clarification. --- ChangeLog | 6 +++++- doc/pcre2api.3 | 13 ++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87979bf..76183f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -370,7 +370,11 @@ displaying fields containing NULLS: space or a #-type comment that was followed by (?-x), which turns off PCRE2_EXTENDED, and there was no subsequent (?x) to turn it on again, pcre2_compile() assumed that (?-x) applied to the whole pattern and -consequently mis-compiled it. This bug was found by the LLVM fuzzer. +consequently mis-compiled it. This bug was found by the LLVM fuzzer. The fix +for this bug means that a setting of any of the (?imsxU) options at the start +of a pattern is no longer transferred to the options that are returned by +PCRE2_INFO_ALLOPTIONS. In fact, this was an anachronism that should have +changed when the effects of those options were all moved to compile time. Version 10.20 30-June-2015 diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 index c878dda..afd3779 100644 --- a/doc/pcre2api.3 +++ b/doc/pcre2api.3 @@ -1,4 +1,4 @@ -.TH PCRE2API 3 "21 November 2015" "PCRE2 10.21" +.TH PCRE2API 3 "03 December 2015" "PCRE2 10.21" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .sp @@ -1565,11 +1565,10 @@ are as follows: Return a copy of the pattern's options. The third argument should point to a \fBuint32_t\fP variable. PCRE2_INFO_ARGOPTIONS returns exactly the options that were passed to \fBpcre2_compile()\fP, whereas PCRE2_INFO_ALLOPTIONS returns -the compile options as modified by any top-level option settings at the start -of the pattern itself. In other words, they are the options that will be in -force when matching starts. For example, if the pattern /(?im)abc(?-i)d/ is -compiled with the PCRE2_EXTENDED option, the result is PCRE2_CASELESS, -PCRE2_MULTILINE, and PCRE2_EXTENDED. +the compile options as modified by any top-level option settings such as (*UTF) +at the start of the pattern itself. For example, if the pattern /(*UTF)abc/ is +compiled with the PCRE2_EXTENDED option, the result is PCRE2_EXTENDED and +PCRE2_UTF. .P A pattern compiled without PCRE2_ANCHORED is automatically anchored by PCRE2 if the first significant item in every top-level branch is one of the following: @@ -3101,6 +3100,6 @@ Cambridge, England. .rs .sp .nf -Last updated: 21 November 2015 +Last updated: 03 December 2015 Copyright (c) 1997-2015 University of Cambridge. .fi