This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Reorder CVf_* flags to be numerically contiguous again.
authorNicholas Clark <nick@ccl4.org>
Wed, 9 Jun 2010 18:53:20 +0000 (19:53 +0100)
committerNicholas Clark <nick@ccl4.org>
Wed, 9 Jun 2010 18:53:20 +0000 (19:53 +0100)
The removal of CVf_ASSERTION in 584420f022db5722 and CVf_LOCKED in
e95ab0c0d2aa1b35 left two gaps in the sequence of bits in use.

cv.h
ext/Devel-Peek/t/Peek.t

diff --git a/cv.h b/cv.h
index 182415e..64eb02a 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -63,7 +63,9 @@ Returns the stash of the CV.
 #define CvOUTSIDE_SEQ(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside_seq
 
 #define CVf_METHOD     0x0001  /* CV is explicitly marked as a method */
-#define CVf_LVALUE     0x0004  /* CV return value can be used as lvalue */
+#define CVf_LVALUE     0x0002  /* CV return value can be used as lvalue */
+#define CVf_CONST      0x0004  /* inlinable sub */
+#define CVf_ISXSUB     0x0008  /* CV is an XSUB, not pure perl.  */
 
 #define CVf_WEAKOUTSIDE        0x0010  /* CvOUTSIDE isn't ref counted */
 #define CVf_CLONE      0x0020  /* anon CV uses external lexicals */
@@ -73,8 +75,6 @@ Returns the stash of the CV.
                                 * require, eval). */
 #define CVf_NODEBUG    0x0200  /* no DB::sub indirection for this CV
                                   (esp. useful for special XSUBs) */
-#define CVf_CONST      0x0400  /* inlinable sub */
-#define CVf_ISXSUB     0x0800  /* CV is an XSUB, not pure perl.  */
 
 /* This symbol for optimised communication between toke.c and op.c: */
 #define CVf_BUILTIN_ATTRS      (CVf_METHOD|CVf_LVALUE)
index e4ccbf5..699afd6 100644 (file)
@@ -56,10 +56,11 @@ sub do_test {
            # legitimate regexp, it still isn't true. Seems easier and clearer
            # things that look like comments.
 
+           my $version_condition = qr/\$] [<>]=? 5\.\d\d\d/;
            # Could do this is in a s///mge but seems clearer like this:
            $pattern = join '', map {
                # If we identify the version condition, take *it* out whatever
-               s/\s*# (\$] [<>]=? 5\.\d\d\d)$//
+               s/\s*# ($version_condition(?: && $version_condition)?)$//
                    ? (eval $1 ? $_ : '')
                    : $_ # Didn't match, so this line is in
            } split /^/, $pattern;
@@ -311,6 +312,7 @@ do_test(14,
        \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$todo"
        \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$repeat_todo"
        \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$pattern"
+      \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$version_condition"
       \\d+\\. $ADDR<\\d+> FAKE "\\$DEBUG"                      # $] < 5.009
       \\d+\\. $ADDR<\\d+> FAKE "\\$DEBUG" flags=0x0 index=0    # $] >= 5.009
       \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$dump"
@@ -591,7 +593,8 @@ do_test(23,
     MUTEXP = $ADDR
     OWNER = $ADDR)?
     FLAGS = 0x200                              # $] < 5.009
-    FLAGS = 0xc00                              # $] >= 5.009
+    FLAGS = 0xc00                              # $] >= 5.009 && $] < 5.013
+    FLAGS = 0xc                                        # $] >= 5.013
     OUTSIDE_SEQ = 0
     PADLIST = 0x0
     OUTSIDE = 0x0 \\(null\\)');