summaryrefslogtreecommitdiff
path: root/src/pcre2_pattern_info.c
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-03-12 13:47:01 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-03-12 13:47:01 +0000
commit4dc316b04f2ff86d26cebca81c624330f4af6361 (patch)
treee0b777b342b7a0e1711c58dbce3ecb568fe6c211 /src/pcre2_pattern_info.c
parent47f31dcbb0aa3ae83c097b7a439fb74b3fa994bb (diff)
downloadpcre2-4dc316b04f2ff86d26cebca81c624330f4af6361.tar.gz
Change "limit recursion" to "limit depth" in code and build systems because the
old name, which is retained as a synonym for the moment, is no longer appropriate. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@678 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_pattern_info.c')
-rw-r--r--src/pcre2_pattern_info.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pcre2_pattern_info.c b/src/pcre2_pattern_info.c
index 5b32a90..98482f9 100644
--- a/src/pcre2_pattern_info.c
+++ b/src/pcre2_pattern_info.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2016-2017 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -75,6 +75,7 @@ if (where == NULL) /* Requests field length */
case PCRE2_INFO_BACKREFMAX:
case PCRE2_INFO_BSR:
case PCRE2_INFO_CAPTURECOUNT:
+ case PCRE2_INFO_DEPTHLIMIT:
case PCRE2_INFO_FIRSTCODETYPE:
case PCRE2_INFO_FIRSTCODEUNIT:
case PCRE2_INFO_HASBACKSLASHC:
@@ -89,7 +90,6 @@ if (where == NULL) /* Requests field length */
case PCRE2_INFO_NAMEENTRYSIZE:
case PCRE2_INFO_NAMECOUNT:
case PCRE2_INFO_NEWLINE:
- case PCRE2_INFO_RECURSIONLIMIT:
return sizeof(uint32_t);
case PCRE2_INFO_FIRSTBITMAP:
@@ -137,6 +137,11 @@ switch(what)
*((uint32_t *)where) = re->top_bracket;
break;
+ case PCRE2_INFO_DEPTHLIMIT:
+ *((uint32_t *)where) = re->limit_depth;
+ if (re->limit_depth == UINT32_MAX) return PCRE2_ERROR_UNSET;
+ break;
+
case PCRE2_INFO_FIRSTCODETYPE:
*((uint32_t *)where) = ((re->flags & PCRE2_FIRSTSET) != 0)? 1 :
((re->flags & PCRE2_STARTLINE) != 0)? 2 : 0;
@@ -215,11 +220,6 @@ switch(what)
*((uint32_t *)where) = re->newline_convention;
break;
- case PCRE2_INFO_RECURSIONLIMIT:
- *((uint32_t *)where) = re->limit_recursion;
- if (re->limit_recursion == UINT32_MAX) return PCRE2_ERROR_UNSET;
- break;
-
case PCRE2_INFO_SIZE:
*((size_t *)where) = re->blocksize;
break;