summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-08 21:33:29 +0100
committerNicholas Clark <nick@ccl4.org>2010-10-08 21:37:59 +0100
commitb4dd66232df8f0d1c00796970dec7fc37fbe9edf (patch)
treefeaa443d42eec3005b98d945c3374ba4b4896b5a /gv.c
parent899de42e58b123b7d2b0fa4df5354d07472913bc (diff)
downloadperl-b4dd66232df8f0d1c00796970dec7fc37fbe9edf.tar.gz
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.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gv.c b/gv.c
index 1ed129ed04..4ad54df309 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;
}