diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2022-09-09 21:47:05 +0000 |
---|---|---|
committer | Richard Leach <richardleach@users.noreply.github.com> | 2022-09-18 23:50:26 +0100 |
commit | 94e822ee24ba222efc1979d79e64ca7b2c0942cb (patch) | |
tree | 367e22241dad5be2ca1af27b76a0e9263dfd548e /sv.c | |
parent | 51918aaf0287a9f5643ea3161fd8c6091a127428 (diff) | |
download | perl-94e822ee24ba222efc1979d79e64ca7b2c0942cb.tar.gz |
vnewSVpvf - inline & reduce call to sv_vsetpvfn
sv_vsetpvfn does just two things:
* SvPVCLEAR on the sv passed in
* calls sv_vcatpvfn_flags
Since the SV passed into sv_vsetpvfn by vnewSVpvf is a brand new SV,
it is more efficient to inline sv_vsetpvfn and change the SvPVCLEAR
to SvPVCLEAR_FRESH.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -9767,8 +9767,9 @@ Perl_vnewSVpvf(pTHX_ const char *const pat, va_list *const args) PERL_ARGS_ASSERT_VNEWSVPVF; - new_SV(sv); - sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL); + sv = newSV(1); + SvPVCLEAR_FRESH(sv); + sv_vcatpvfn_flags(sv, pat, strlen(pat), args, NULL, 0, NULL, 0); return sv; } |