In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/7f4ec488653048a5623702c419020a9402453c6a?hp=f720c878cb3248e9e723e67cb95dab8b304b2650>

- Log -----------------------------------------------------------------
commit 7f4ec488653048a5623702c419020a9402453c6a
Author: Karl Williamson <k...@cpan.org>
Date:   Sat Mar 25 11:35:11 2017 -0600

    dquote.c: Rmv extraneous #ifdef; add assertions
    
    assert() already does nothing unless -DDEBUGGING; no need to enclose
    them in #ifdef DEBUGGING.  And this adds another assertion that is
    required to be true on entry to the function.

commit 5f50c6c9d82978f1ddf6d78eea0235b7b3d1836b
Author: Karl Williamson <k...@cpan.org>
Date:   Mon Apr 24 13:09:16 2017 -0600

    handy.h: Add parens around macro expansion
    
    This guarantees the expected precedence no matter what the context it is
    called in.

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

Summary of changes:
 dquote.c | 17 +++++------------
 handy.h  |  2 +-
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/dquote.c b/dquote.c
index e02308e7ac..19a7a378f5 100644
--- a/dquote.c
+++ b/dquote.c
@@ -96,15 +96,10 @@ Perl_grok_bslash_o(pTHX_ char **s, UV *uv, const char** 
error_msg,
                 * ourselves */
                | PERL_SCAN_SILENT_ILLDIGIT;
 
-#ifdef DEBUGGING
-    char *start = *s - 1;
-    assert(*start == '\\');
-#endif
-
     PERL_ARGS_ASSERT_GROK_BSLASH_O;
 
-
-    assert(**s == 'o');
+    assert(*(*s - 1) == '\\');
+    assert(* *s       == 'o');
     (*s)++;
 
     if (**s != '{') {
@@ -201,14 +196,12 @@ Perl_grok_bslash_x(pTHX_ char **s, UV *uv, const char** 
error_msg,
     char* e;
     STRLEN numbers_len;
     I32 flags = PERL_SCAN_DISALLOW_PREFIX;
-#ifdef DEBUGGING
-    char *start = *s - 1;
-    assert(*start == '\\');
-#endif
+
 
     PERL_ARGS_ASSERT_GROK_BSLASH_X;
 
-    assert(**s == 'x');
+    assert(*(*s - 1) == '\\');
+    assert(* *s      == 'x');
     (*s)++;
 
     if (strict || ! output_warning) {
diff --git a/handy.h b/handy.h
index bd1d75a453..2999b3c451 100644
--- a/handy.h
+++ b/handy.h
@@ -490,7 +490,7 @@ Returns zero if non-equal, or non-zero if equal.
 /* memEQ and memNE where second comparand is a string constant */
 #define memEQs(s1, l, s2) \
         (((sizeof(s2)-1) == (l)) && memEQ((s1), ("" s2 ""), (sizeof(s2)-1)))
-#define memNEs(s1, l, s2) !memEQs(s1, l, s2)
+#define memNEs(s1, l, s2) (! memEQs(s1, l, s2))
 
 /* memEQ and memNE where second comparand is a string constant
  * and we can assume the length of s1 is at least that of the string */

-- 
Perl5 Master Repository

Reply via email to