[Pcre-svn] [401] code/trunk: Use PCRE2_NO_UTF_CHECK for the …

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [401] code/trunk: Use PCRE2_NO_UTF_CHECK for the second and subsequent matches in
Revision: 401
          http://www.exim.org/viewvc/pcre2?view=rev&revision=401
Author:   ph10
Date:     2015-10-30 17:41:56 +0000 (Fri, 30 Oct 2015)
Log Message:
-----------
Use PCRE2_NO_UTF_CHECK for the second and subsequent matches in 
pcre2_substitute().


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_substitute.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2015-10-30 17:30:03 UTC (rev 400)
+++ code/trunk/ChangeLog    2015-10-30 17:41:56 UTC (rev 401)
@@ -233,7 +233,10 @@
 replacement string was happening before the length setting when the replacement
 string was zero-terminated.


+68. In pcre2_substitute() in UTF mode, PCRE2_NO_UTF_CHECK can be set for the
+second and subsequent calls to pcre2_match().

+
Version 10.20 30-June-2015
--------------------------


Modified: code/trunk/src/pcre2_substitute.c
===================================================================
--- code/trunk/src/pcre2_substitute.c    2015-10-30 17:30:03 UTC (rev 400)
+++ code/trunk/src/pcre2_substitute.c    2015-10-30 17:41:56 UTC (rev 401)
@@ -279,6 +279,10 @@


   rc = pcre2_match(code, subject, length, start_offset, options|goptions,
     match_data, mcontext);
+    
+#ifdef SUPPORT_UNICODE
+  if (utf) options |= PCRE2_NO_UTF_CHECK;  /* Only need to check once */
+#endif   


/* Any error other than no match returns the error code. No match when not
doing the special after-empty-match global rematch, or when at the end of the