This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01680ee
)
sv.c: One less assignment in sv_pvutf8n_force
author
Father Chrysostomos
<sprout@cpan.org>
Sun, 30 Sep 2012 06:31:44 +0000
(23:31 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Mon, 1 Oct 2012 19:51:57 +0000
(12:51 -0700)
This function always assigns to *lp twice (though indirectly the first
time). It only needs to do so once.
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
641b56f
..
c446fba
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-9122,7
+9122,7
@@
Perl_sv_pvutf8n_force(pTHX_ SV *const sv, STRLEN *const lp)
{
PERL_ARGS_ASSERT_SV_PVUTF8N_FORCE;
- sv_pvn_force(sv,
lp
);
+ sv_pvn_force(sv,
0
);
sv_utf8_upgrade_nomg(sv);
*lp = SvCUR(sv);
return SvPVX(sv);