summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-06 17:38:29 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-06 23:00:57 -0700
commitb69f5762a54ed8985a9b50b54cbf5912ffda3ea4 (patch)
tree0476b0a22e61dfbcb9fead51be93118792c4caa2 /mro.c
parenta7b227680272751bf7f4d4e9cc85ead19aa13ffa (diff)
downloadperl-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.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/mro.c b/mro.c
index c9b40e5ec6..5f7b939ddd 100644
--- a/mro.c
+++ b/mro.c
@@ -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);
}
}