From 0d68eebac8c6267e56f485c98655b974c7844f1b Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 11 May 2007 00:14:36 +0000 Subject: [PATCH] -Addvert optionto RegexIterator --- ext/spl/spl_iterators.c | 4 ++++ ext/spl/spl_iterators.h | 1 + 2 files changed, 5 insertions(+) diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index da87619073..c0ec8b3581 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1453,6 +1453,10 @@ SPL_METHOD(RegexIterator, accept) } } + if (intern->u.regex.flags & REGIT_INVERTED) { + RETVAL_BOOL(Z_LVAL_P(return_value)); + } + if (use_copy) { efree(subject); } diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h index 2b7cee891e..e2be25d282 100755 --- a/ext/spl/spl_iterators.h +++ b/ext/spl/spl_iterators.h @@ -94,6 +94,7 @@ enum { enum { /* public */ REGIT_USE_KEY = 0x00000001, + REGIT_INVERTED = 0x00000002, }; typedef enum { -- 2.40.0