diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-08 21:33:29 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-08 21:37:59 +0100 |
commit | b4dd66232df8f0d1c00796970dec7fc37fbe9edf (patch) | |
tree | feaa443d42eec3005b98d945c3374ba4b4896b5a /gv.c | |
parent | 899de42e58b123b7d2b0fa4df5354d07472913bc (diff) | |
download | perl-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.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |