diff options
author | Yves Orton <demerphq@gmail.com> | 2014-09-02 00:09:01 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2014-09-02 00:32:54 +0200 |
commit | 0eadbdad7ec0b0c6fc943adc20d761deb02e55b8 (patch) | |
tree | e20dec16f42cc8fffa2bac9770ab177883caeeea /gv.c | |
parent | ea4642524cb9cd6a3625b957b4f2736e08d7e30d (diff) | |
download | perl-0eadbdad7ec0b0c6fc943adc20d761deb02e55b8.tar.gz |
Rename S_stashpvn to S_gv_stashpvn_internal and add to embed.fnc
S_stashpvn was not added to embed.fnc properly, and is named contrary
to general expectations of the Perl internals.
This fixes that, there should be no other functional differences.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1316,8 +1316,16 @@ The most important of which are probably GV_ADD and SVf_UTF8. =cut */ +/* +gv_stashpvn_internal + +Perform the internal bits of gv_stashsvpvn_cached. You could think of this +as being one half of the logic. Not to be called except from gv_stashsvpvn_cached(). + +*/ + PERL_STATIC_INLINE HV* -S_stashpvn(pTHX_ const char *name, U32 namelen, I32 flags) +S_gv_stashpvn_internal(pTHX_ const char *name, U32 namelen, I32 flags) { char smallbuf[128]; char *tmpbuf; @@ -1325,7 +1333,7 @@ S_stashpvn(pTHX_ const char *name, U32 namelen, I32 flags) GV *tmpgv; U32 tmplen = namelen + 2; - PERL_ARGS_ASSERT_GV_STASHPVN; + PERL_ARGS_ASSERT_GV_STASHPVN_INTERNAL; if (tmplen <= sizeof smallbuf) tmpbuf = smallbuf; @@ -1365,10 +1373,11 @@ Perl_gv_stashpvn(pTHX_ const char *name, U32 namelen, I32 flags) if (he) return INT2PTR(HV*,SvIVX(HeVAL(he))); else if (flags & GV_CACHE_ONLY) return NULL; - stash = S_stashpvn(aTHX_ name, namelen, flags); + stash = gv_stashpvn_internal(name, namelen, flags); + if (stash && namelen) { SV* const ref = newSViv(PTR2IV(stash)); - hv_store(PL_stashcache, name, + (void)hv_store(PL_stashcache, name, (flags & SVf_UTF8) ? -(I32)namelen : (I32)namelen, ref, 0); } return stash; |