summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcre_fullinfo.c
diff options
context:
space:
mode:
authorLior Kaplan <kaplanlior@gmail.com>2014-02-14 22:39:19 +0200
committerLior Kaplan <kaplanlior@gmail.com>2014-02-14 22:39:19 +0200
commitd67160a566757f858e5883201e518230f5221c6b (patch)
tree24f894d317e2f58e2d5372f39a1d53fa30885751 /ext/pcre/pcrelib/pcre_fullinfo.c
parent575107aad92a460051e02de029067359083542b9 (diff)
downloadphp-d67160a566757f858e5883201e518230f5221c6b.tar.gz
Imported Upstream version 5.6.0~alpha2+dfsgupstream/5.6.0_alpha2+dfsg
Diffstat (limited to 'ext/pcre/pcrelib/pcre_fullinfo.c')
-rw-r--r--ext/pcre/pcrelib/pcre_fullinfo.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/pcre_fullinfo.c b/ext/pcre/pcrelib/pcre_fullinfo.c
index 02c9df4a8..a6c2ece6c 100644
--- a/ext/pcre/pcrelib/pcre_fullinfo.c
+++ b/ext/pcre/pcrelib/pcre_fullinfo.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2012 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -222,6 +222,20 @@ switch (what)
*((int *)where) = re->max_lookbehind;
break;
+ case PCRE_INFO_MATCHLIMIT:
+ if ((re->flags & PCRE_MLSET) == 0) return PCRE_ERROR_UNSET;
+ *((pcre_uint32 *)where) = re->limit_match;
+ break;
+
+ case PCRE_INFO_RECURSIONLIMIT:
+ if ((re->flags & PCRE_RLSET) == 0) return PCRE_ERROR_UNSET;
+ *((pcre_uint32 *)where) = re->limit_recursion;
+ break;
+
+ case PCRE_INFO_MATCH_EMPTY:
+ *((int *)where) = (re->flags & PCRE_MATCH_EMPTY) != 0;
+ break;
+
default: return PCRE_ERROR_BADOPTION;
}