summaryrefslogtreecommitdiff
path: root/src/pcre2_pattern_info.c
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-12-16 17:49:26 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-12-16 17:49:26 +0000
commita0ed1419b31b7a3c778223d6ab45bec4dc491bda (patch)
treedf2b1da86bcc61f5a2b194175088ea06bb2d6671 /src/pcre2_pattern_info.c
parent22fd68edea35cb482c473b6e727b4bc8a2dddb5d (diff)
downloadpcre2-a0ed1419b31b7a3c778223d6ab45bec4dc491bda.tar.gz
Save extra compile options with the compiled pattern, and add an info call to
retrieve them. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@892 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_pattern_info.c')
-rw-r--r--src/pcre2_pattern_info.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pcre2_pattern_info.c b/src/pcre2_pattern_info.c
index 540707b..1a51a92 100644
--- a/src/pcre2_pattern_info.c
+++ b/src/pcre2_pattern_info.c
@@ -76,6 +76,7 @@ if (where == NULL) /* Requests field length */
case PCRE2_INFO_BSR:
case PCRE2_INFO_CAPTURECOUNT:
case PCRE2_INFO_DEPTHLIMIT:
+ case PCRE2_INFO_EXTRAOPTIONS:
case PCRE2_INFO_FIRSTCODETYPE:
case PCRE2_INFO_FIRSTCODEUNIT:
case PCRE2_INFO_HASBACKSLASHC:
@@ -144,6 +145,10 @@ switch(what)
if (re->limit_depth == UINT32_MAX) return PCRE2_ERROR_UNSET;
break;
+ case PCRE2_INFO_EXTRAOPTIONS:
+ *((uint32_t *)where) = re->extra_options;
+ break;
+
case PCRE2_INFO_FIRSTCODETYPE:
*((uint32_t *)where) = ((re->flags & PCRE2_FIRSTSET) != 0)? 1 :
((re->flags & PCRE2_STARTLINE) != 0)? 2 : 0;