This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_sv_vcatpvfn_flags: remove redundant code
authorDavid Mitchell <davem@iabyn.com>
Sat, 20 May 2017 12:01:02 +0000 (13:01 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 7 Jun 2017 08:11:03 +0000 (09:11 +0100)
commit9cc0d8397eaa8e121e0d8f44e86a19132c12a899
treefe7ed1b2348c6b749c3ba5a35f7e1b73dca1f4c0
parent27b6e3b1f92b0d1cef7c9597770147628d7240bf
Perl_sv_vcatpvfn_flags: remove redundant code

At the start of the function, it marks the output as being utf8 if the
first arg is utf8. But this should be taken care of when the individual
args (including the first one are processed). So its redundant code.

In fact it would sometimes cause the resultant string to be unnecessarily
upgraded to utf8, e.g.:

    my $precis = "9";
    utf8::upgrade($precis);
    my $s = sprintf "%.*f\n", $precis, 1.1;
    # whoops, $s is now utf8
sv.c
t/op/sprintf2.t