[Pcre-svn] [1190] code/trunk: Use PCRE2_MATCH_EMPTY flag to …

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1190] code/trunk: Use PCRE2_MATCH_EMPTY flag to detect empty matches in JIT.
Revision: 1190
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1190
Author:   zherczeg
Date:     2019-11-28 11:35:08 +0000 (Thu, 28 Nov 2019)
Log Message:
-----------
Use PCRE2_MATCH_EMPTY flag to detect empty matches in JIT.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_jit_compile.c
    code/trunk/src/pcre2_jit_test.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2019-11-21 16:31:53 UTC (rev 1189)
+++ code/trunk/ChangeLog    2019-11-28 11:35:08 UTC (rev 1190)
@@ -1,7 +1,12 @@
 Change Log for PCRE2
 --------------------


+Version 10.35
+-------------

+1. Use PCRE2_MATCH_EMPTY flag to detect empty matches in JIT.
+
+
Version 10.34 21-November-2019
------------------------------


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2019-11-21 16:31:53 UTC (rev 1189)
+++ code/trunk/src/pcre2_jit_compile.c    2019-11-28 11:35:08 UTC (rev 1190)
@@ -13122,8 +13122,8 @@
 common->fcc = tables + fcc_offset;
 common->lcc = (sljit_sw)(tables + lcc_offset);
 common->mode = mode;
-common->might_be_empty = re->minlength == 0;
-common->allow_empty_partial = (re->max_lookbehind > 0) || (re->flags & PCRE2_MATCH_EMPTY) != 0;
+common->might_be_empty = (re->minlength == 0) || (re->flags & PCRE2_MATCH_EMPTY);
+common->allow_empty_partial = (re->max_lookbehind > 0) || (re->flags & PCRE2_MATCH_EMPTY);
 common->nltype = NLTYPE_FIXED;
 switch(re->newline_convention)
   {


Modified: code/trunk/src/pcre2_jit_test.c
===================================================================
--- code/trunk/src/pcre2_jit_test.c    2019-11-21 16:31:53 UTC (rev 1189)
+++ code/trunk/src/pcre2_jit_test.c    2019-11-28 11:35:08 UTC (rev 1190)
@@ -638,6 +638,7 @@
     { MU, A, 0, 0, "(?=(?:x|ab(*ACCEPT)b))", "ab" },
     { MU, A, 0, 0, "(?=(a(b(*ACCEPT)b)))a", "ab" },
     { MU, A, PCRE2_NOTEMPTY, 0, "(?=a*(*ACCEPT))c", "c" },
+    { MU, A, PCRE2_NOTEMPTY, 0 | F_NOMATCH, "(?=A)", "AB" },


     /* Conditional blocks. */
     { MU, A, 0, 0, "(?(?=(a))a|b)+k", "ababbalbbadabak" },