This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: use new SvPVCLEAR and constant string friendly macros
authorYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 09:14:27 +0000 (11:14 +0200)
committerYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 11:28:02 +0000 (13:28 +0200)
utf8.c

diff --git a/utf8.c b/utf8.c
index 8646323..d7450d7 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -4693,7 +4693,7 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f
 
     PERL_ARGS_ASSERT_PV_UNI_DISPLAY;
 
-    sv_setpvs(dsv, "");
+    SvPVCLEAR(dsv);
     SvUTF8_off(dsv);
     for (s = (const char *)spv, e = s + len; s < e; s += UTF8SKIP(s)) {
         UV u;