diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-09-06 17:38:29 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-06 23:00:57 -0700 |
commit | b69f5762a54ed8985a9b50b54cbf5912ffda3ea4 (patch) | |
tree | 0476b0a22e61dfbcb9fead51be93118792c4caa2 /mro.c | |
parent | a7b227680272751bf7f4d4e9cc85ead19aa13ffa (diff) | |
download | perl-b69f5762a54ed8985a9b50b54cbf5912ffda3ea4.tar.gz |
mro.c: Don’t inline sv_sethek
This code actually long predates sv_sethek. But now that we have it,
we can call it, reducing the size of mro.o.
Diffstat (limited to 'mro.c')
-rw-r--r-- | mro.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -307,19 +307,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level) HEK *const key = HeKEY_hek(he); HeVAL(he) = &PL_sv_undef; - /* Save copying by making a shared hash key scalar. We - inline this here rather than calling - Perl_newSVpvn_share because we already have the - scalar, and we already have the hash key. */ - assert(SvTYPE(val) == SVt_NULL); - sv_upgrade(val, SVt_PV); - SvPV_set(val, HEK_KEY(share_hek_hek(key))); - SvCUR_set(val, HEK_LEN(key)); - SvIsCOW_on(val); - SvPOK_on(val); - if (HEK_UTF8(key)) - SvUTF8_on(val); - + sv_sethek(val, key); av_push(retval, val); } } |