In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bbac6b2092e662cc7df6fe1e0cbdc7f6be3a717e?hp=9a7bb2f73a8a1b561890191974201d576371e7f9>

- Log -----------------------------------------------------------------
commit bbac6b2092e662cc7df6fe1e0cbdc7f6be3a717e
Author: Karl Williamson <[email protected]>
Date:   Sun Aug 23 10:45:43 2015 -0600

    regexec.c: Move a #define next to related code
    
    One message here uses a static array, and one uses a #define.  I don't
    think it really matters, but they should be adjacent.

M       regexec.c

commit b2e90ddfdd0e25368528bb258e8d4b9e82a7a6f5
Author: Karl Williamson <[email protected]>
Date:   Sun Aug 23 10:45:22 2015 -0600

    Output bad locale warning in regex synthetic start class
    
    perl detects some locale errors when a new locale is entered.  It stores
    these up to output upon first use of something that uses that locale.  A
    synthetic start class (SSC) is used by the regex optimizer under certain
    circumstances.  Prior to this patch, it was possible for the stored up
    bad locale message to not be raised if the match failed the SSC.  This
    patch fixes this by changing the node type of the SSC to be one that
    checks for the stored-up message should there be locale-dependent
    portions of the pattern.

M       regcomp.c
-----------------------------------------------------------------------

Summary of changes:
 regcomp.c | 4 ++++
 regexec.c | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/regcomp.c b/regcomp.c
index 982fdd1..9075fc5 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1639,6 +1639,10 @@ S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, 
regnode_ssc *ssc)
         ANYOF_FLAGS(ssc) |= ANYOF_MATCHES_POSIXL;
     }
 
+    if (RExC_contains_locale) {
+        OP(ssc) = ANYOFL;
+    }
+
     assert(! (ANYOF_FLAGS(ssc) & ANYOF_LOCALE_FLAGS) || RExC_contains_locale);
 }
 
diff --git a/regexec.c b/regexec.c
index 781bc6b..cb209c8 100644
--- a/regexec.c
+++ b/regexec.c
@@ -37,9 +37,6 @@
 #include "re_top.h"
 #endif
 
-#define B_ON_NON_UTF8_LOCALE_IS_WRONG            \
-      "Use of \\b{} or \\B{} for non-UTF-8 locale is wrong.  Assuming a UTF-8 
locale"
-
 /*
  * pregcomp and pregexec -- regsub and regerror are not used in perl
  *
@@ -86,6 +83,9 @@
 #include "invlist_inline.h"
 #include "unicode_constants.h"
 
+#define B_ON_NON_UTF8_LOCALE_IS_WRONG            \
+ "Use of \\b{} or \\B{} for non-UTF-8 locale is wrong.  Assuming a UTF-8 
locale"
+
 static const char utf8_locale_required[] =
       "Use of (?[ ]) for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale";
 

--
Perl5 Master Repository

Reply via email to