In perl.git, the branch smoke-me/khw-regcomp has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/3747109886ee630f649373b96efb2bf8cbdca1c6?hp=6ee8cbcd7dc77d2da268a3abf6d8c3de1fba5f6e>

- Log -----------------------------------------------------------------
commit 3747109886ee630f649373b96efb2bf8cbdca1c6
Author: Karl Williamson <[email protected]>
Date:   Wed Mar 13 09:42:01 2019 -0600

    f

-----------------------------------------------------------------------

Summary of changes:
 toke.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/toke.c b/toke.c
index 0805e84250..0435c6f089 100644
--- a/toke.c
+++ b/toke.c
@@ -2629,22 +2629,21 @@ Perl_get_and_check_backslash_N_name(pTHX_ const char* s,
      * doesn't have to be. */
 
     SV* res;
-    dVAR;
-
-    assert(e >= s);
-    assert(s > (char *) 3);
-
-    res = newSVpvn_flags(s, e - s, (is_utf8) ? SVf_UTF8 : 0);
-
     HV * table;
     SV **cvp;
     SV *cv;
     SV *rv;
     HV *stash;
     const char* backslash_ptr = s - 3; /* Points to the <\> of \N{... */
+    dVAR;
 
     PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME;
 
+    assert(e >= s);
+    assert(s > (char *) 3);
+
+    res = newSVpvn_flags(s, e - s, (is_utf8) ? SVf_UTF8 : 0);
+
     if (!SvCUR(res)) {
         SvREFCNT_dec_NN(res);
         /* diag_listed_as: Unknown charname '%s' */
@@ -10714,9 +10713,16 @@ S_scan_str(pTHX_ char *start, int 
keep_bracketed_quoted, int keep_delims, int re
                if (*s == '\n' && !PL_rsfp && !PL_parser->filtered)
                    COPLINE_INC_WITH_HERELINES;
                /* handle quoted delimiters */
-               if (*s == '\\' && s+1 < PL_bufend && term != '\\') {
-                   if (!keep_bracketed_quoted
-                       && (s[1] == term
+               if (   *s == '\\'
+                    && s+1 < PL_bufend
+                    && term != '\\'
+                    && (   ! keep_delims
+                        || s - start < 2        // XXX only in dquotish 
contexts Now unsure what this was for
+                        || *(s - 1) != 'c'
+                        || *(s - 2) != '\\'))
+                {
+                   if (   ! keep_bracketed_quoted
+                       && (    s[1] == term
                            || (re_reparse && s[1] == '\\'))
                    )
                        s++;

-- 
Perl5 Master Repository

Reply via email to