summaryrefslogtreecommitdiff
path: root/src/pcre2_pattern_info.c
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-03-16 17:55:55 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-03-16 17:55:55 +0000
commit589466b3fa70649d27eb20050dfe9bca0b1149c6 (patch)
tree37bb63c9991d54111a4efa4cd5f2b1c354074fb6 /src/pcre2_pattern_info.c
parenta74ea02e5006bae4484b508b04a010e90c4dfdc2 (diff)
downloadpcre2-589466b3fa70649d27eb20050dfe9bca0b1149c6.tar.gz
Add "framesize" to pcre2test to display pcre2_match() frame size, using the new
PCRE2_INFO_FRAMESIZE option for pcre2_pattern_info(). git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@682 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_pattern_info.c')
-rw-r--r--src/pcre2_pattern_info.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pcre2_pattern_info.c b/src/pcre2_pattern_info.c
index 98482f9..0392a0b 100644
--- a/src/pcre2_pattern_info.c
+++ b/src/pcre2_pattern_info.c
@@ -97,6 +97,7 @@ if (where == NULL) /* Requests field length */
case PCRE2_INFO_JITSIZE:
case PCRE2_INFO_SIZE:
+ case PCRE2_INFO_FRAMESIZE:
return sizeof(size_t);
case PCRE2_INFO_NAMETABLE:
@@ -157,6 +158,11 @@ switch(what)
&(re->start_bitmap[0]) : NULL;
break;
+ case PCRE2_INFO_FRAMESIZE:
+ *((size_t *)where) = sizeof(heapframe) +
+ ((re->top_bracket - 1) * 2 * sizeof(PCRE2_SIZE));
+ break;
+
case PCRE2_INFO_HASBACKSLASHC:
*((uint32_t *)where) = (re->flags & PCRE2_HASBKC) != 0;
break;