In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/b4dd66232df8f0d1c00796970dec7fc37fbe9edf?hp=899de42e58b123b7d2b0fa4df5354d07472913bc>

- Log -----------------------------------------------------------------
commit b4dd66232df8f0d1c00796970dec7fc37fbe9edf
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 8 21:33:29 2010 +0100

    Remove dead code from Perl_gv_stashpvn().
    
    GvHV() and HvNAME() will both always already be set, as gv_fetchpvn_flags()
    will initialise these as it walks the string in its initial loop to locate 
the
    correct stash, then return early because name == name_end.
    
    This code has been dead since it was added in 5.000.
-----------------------------------------------------------------------

Summary of changes:
 gv.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/gv.c b/gv.c
index 1ed129e..4ad54df 100644
--- a/gv.c
+++ b/gv.c
@@ -927,11 +927,9 @@ Perl_gv_stashpvn(pTHX_ const char *name, U32 namelen, I32 
flags)
        Safefree(tmpbuf);
     if (!tmpgv)
        return NULL;
-    if (!GvHV(tmpgv))
-       GvHV(tmpgv) = newHV();
     stash = GvHV(tmpgv);
-    if (!HvNAME_get(stash))
-       hv_name_set(stash, name, namelen, 0);
+    assert(stash);
+    assert(HvNAME_get(stash));
     return stash;
 }
 

--
Perl5 Master Repository

Reply via email to