summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorRichard Leach <richardleach@users.noreply.github.com>2022-07-28 22:35:24 +0000
committerKarl Williamson <khw@cpan.org>2022-08-05 14:44:12 -0600
commit518db96ae536faa5656a7cdc6b3dc510b75edb79 (patch)
tree0a339e11a13dc7a5381a2f6b2a7624e83be2f6ae /util.c
parente033b0b9c2bf27f70f0267fc75188d4e7d2fc863 (diff)
downloadperl-518db96ae536faa5656a7cdc6b3dc510b75edb79.tar.gz
Replace sv_2mortal(newSVhek( with newSVhek_mortal
The new Perl_newSVhek_mortal function is slightly more efficient.
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 9f17ed3ec5..231daf06da 100644
--- a/util.c
+++ b/util.c
@@ -1756,7 +1756,7 @@ Perl_mess_sv(pTHX_ SV *basemsg, bool consume)
Perl_sv_catpvf(aTHX_ sv, ", <%" SVf "> %s %" IVdf,
SVfARG(PL_last_in_gv == PL_argvgv
? &PL_sv_no
- : sv_2mortal(newSVhek(GvNAME_HEK(PL_last_in_gv)))),
+ : newSVhek_mortal(GvNAME_HEK(PL_last_in_gv))),
line_mode ? "line" : "chunk",
(IV)IoLINES(GvIOp(PL_last_in_gv)));
}
@@ -3916,7 +3916,7 @@ Perl_report_evil_fh(pTHX_ const GV *gv)
if (ckWARN(warn_type)) {
SV * const name
= gv && isGV_with_GP(gv) && GvENAMELEN(gv) ?
- sv_2mortal(newSVhek(GvENAME_HEK(gv))) : NULL;
+ newSVhek_mortal(GvENAME_HEK(gv)) : NULL;
const char * const pars =
(const char *)(OP_IS_FILETEST(op) ? "" : "()");
const char * const func =