In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/845ccf38911ca1b6b2a8144d8725b30f40b082ee?hp=4320851cd57948e3e528ddb2ea5adc8e2d873271>

- Log -----------------------------------------------------------------
commit 845ccf38911ca1b6b2a8144d8725b30f40b082ee
Author: Karl Williamson <[email protected]>
Date:   Tue Jul 23 09:42:25 2013 -0600

    sv.c: Remove duplicate dups
    
    These dupes of two tinterpreter variables were already done a few lines
    above; also move a third, related, dupe to where the others are done.

M       sv.c

commit feeac82ab7a4021ae6c3b13cf3bcc394a7a3f9bc
Author: Karl Williamson <[email protected]>
Date:   Sun Jul 21 10:49:05 2013 -0600

    Remove useless assignments
    
    These aren't used after setting.  They came from blindly copying code to
    this.

M       regcomp.c

commit 4d5e5e004ff6a117972995779fc75aaea42a3d4c
Author: Karl Williamson <[email protected]>
Date:   Sat Jul 20 13:21:14 2013 -0600

    regcomp.c: Fix #define
    
    cl_init_zero should not be defined as S_cl_init, just 'cl_init'.  The S_
    prefix is wrong should cl_init be changed to have a pTHX_.

M       regcomp.c

commit 4b6068b02d48704ff996e74c05a63f5a87c70a15
Author: Karl Williamson <[email protected]>
Date:   Sat Jul 20 13:16:55 2013 -0600

    regcomp.c: Remove wrong/obsolete line
    
    This line was made obsolete and wrong by commit
    a0316a6cd4a14261beb22d95530d5763e8b6756b, which changed the format of
    inversion lists.  This hasn't caused problems because the code currently
    is #ifdef'd out.

M       regcomp.c

commit f49d80741c9b7322c31473ee711d466d875ac060
Author: Karl Williamson <[email protected]>
Date:   Tue Jul 23 09:25:36 2013 -0600

    regcomp.c: Add some asserts()
    
    Now that inversion lists are their own scalar types, we can verify that
    the parameters to their manipulation functions are indeed inversion
    lists.  This adds such assertions to the bottom level code that deals
    with the bare metal of the scalars.  Functions that call these (even if
    only in other asserts) didn't have asserts added to them, as they call
    these anyway.

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

Summary of changes:
 inline_invlist.c |  4 ++++
 regcomp.c        | 17 +++++++++++++----
 sv.c             |  4 +---
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/inline_invlist.c b/inline_invlist.c
index 470659b..1aea9f7 100644
--- a/inline_invlist.c
+++ b/inline_invlist.c
@@ -25,6 +25,8 @@ S_get_invlist_offset_addr(pTHX_ SV* invlist)
 
     PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     return &(((XINVLIST*) SvANY(invlist))->is_offset);
 }
 
@@ -36,6 +38,8 @@ S__invlist_len(pTHX_ SV* const invlist)
 
     PERL_ARGS_ASSERT__INVLIST_LEN;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     return (SvCUR(invlist) == 0)
            ? 0
            : FROM_INTERNAL_SIZE(SvCUR(invlist)) - 
*get_invlist_offset_addr(invlist);
diff --git a/regcomp.c b/regcomp.c
index b40425f..0211f96 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -848,7 +848,7 @@ S_cl_init(const RExC_state_t *pRExC_state, struct 
regnode_charclass_class *cl)
 }
 
 /* These two functions currently do the exact same thing */
-#define cl_init_zero           S_cl_init
+#define cl_init_zero           cl_init
 
 /* 'AND' a given class with another one.  Can create false positives.  'cl'
  * should not be inverted.  'and_with->flags & ANYOF_CLASS' should be 0 if
@@ -7122,6 +7122,8 @@ S_invlist_set_len(pTHX_ SV* const invlist, const UV len, 
const bool offset)
 
     PERL_ARGS_ASSERT_INVLIST_SET_LEN;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     SvCUR_set(invlist,
               (len == 0)
                ? 0
@@ -7137,6 +7139,8 @@ S_get_invlist_previous_index_addr(pTHX_ SV* invlist)
 
     PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     return &(((XINVLIST*) SvANY(invlist))->prev_index);
 }
 
@@ -7170,6 +7174,8 @@ S_invlist_max(pTHX_ SV* const invlist)
 
     PERL_ARGS_ASSERT_INVLIST_MAX;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     /* Assumes worst case, in which the 0 element is not counted in the
      * inversion list, so subtracts 1 for that */
     return SvLEN(invlist) == 0  /* This happens under _new_invlist_C_array */
@@ -7270,6 +7276,8 @@ S_invlist_extend(pTHX_ SV* const invlist, const UV 
new_max)
 
     PERL_ARGS_ASSERT_INVLIST_EXTEND;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     /* Add one to account for the zero element at the beginning which may not
      * be counted by the calling parameters */
     SvGROW((SV *)invlist, TO_INTERNAL_SIZE(new_max + 1));
@@ -7280,6 +7288,8 @@ S_invlist_trim(pTHX_ SV* const invlist)
 {
     PERL_ARGS_ASSERT_INVLIST_TRIM;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     /* Change the length of the inversion list to how many entries it currently
      * has */
     SvPV_shrink_to_cur((SV *) invlist);
@@ -8134,6 +8144,8 @@ S_get_invlist_iter_addr(pTHX_ SV* invlist)
 
     PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     return &(((XINVLIST*) SvANY(invlist))->iterator);
 }
 
@@ -8344,7 +8356,6 @@ S__invlistEQ(pTHX_ SV* const a, SV* const b, const bool 
complement_b)
              * at the 0 that is always stored immediately before the array. */
             array_b--;
             len_b++;
-            array_b[0] = 0;
         }
     }
 
@@ -13874,8 +13885,6 @@ parseit:
            for (i = start; i <= (int) high; i++) {
                if (! ANYOF_BITMAP_TEST(ret, i)) {
                    ANYOF_BITMAP_SET(ret, i);
-                   prevvalue = value;
-                   value = i;
                }
            }
        }
diff --git a/sv.c b/sv.c
index daa87f0..0f682ea 100644
--- a/sv.c
+++ b/sv.c
@@ -13635,6 +13635,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     /* Unicode inversion lists */
     PL_ASCII           = sv_dup_inc(proto_perl->IASCII, param);
     PL_Latin1          = sv_dup_inc(proto_perl->ILatin1, param);
+    PL_AboveLatin1     = sv_dup_inc(proto_perl->IAboveLatin1, param);
 
     PL_NonL1NonFinalFold = sv_dup_inc(proto_perl->INonL1NonFinalFold, param);
     PL_HasMultiCharFold= sv_dup_inc(proto_perl->IHasMultiCharFold, param);
@@ -13664,9 +13665,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_utf8_foldable   = sv_dup_inc(proto_perl->Iutf8_foldable, param);
     PL_utf8_charname_begin = sv_dup_inc(proto_perl->Iutf8_charname_begin, 
param);
     PL_utf8_charname_continue = 
sv_dup_inc(proto_perl->Iutf8_charname_continue, param);
-    PL_ASCII           = sv_dup_inc(proto_perl->IASCII, param);
-    PL_AboveLatin1     = sv_dup_inc(proto_perl->IAboveLatin1, param);
-    PL_Latin1          = sv_dup_inc(proto_perl->ILatin1, param);
 
     if (proto_perl->Ipsig_pend) {
        Newxz(PL_psig_pend, SIG_SIZE, int);

--
Perl5 Master Repository

Reply via email to