summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-10-19 11:14:26 +0200
committerYves Orton <demerphq@gmail.com>2016-10-19 13:28:01 +0200
commited0faf2e83103ec1f523eb2944e34634a4ed199d (patch)
tree436b94b9f6e4c3e161505390e70ef1cce3c96410 /dump.c
parentf607343fb1743090a7e00b2ce4e24d0594383019 (diff)
downloadperl-ed0faf2e83103ec1f523eb2944e34634a4ed199d.tar.gz
dump.c: use new SvPVCLEAR and constant string friendly macros
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dump.c b/dump.c
index 5f75338974..d2d7f67a8c 100644
--- a/dump.c
+++ b/dump.c
@@ -156,7 +156,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
if (dsv && !(flags & PERL_PV_ESCAPE_NOCLEAR)) {
/* This won't alter the UTF-8 flag */
- sv_setpvs(dsv, "");
+ SvPVCLEAR(dsv);
}
if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
@@ -285,7 +285,7 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
if (!(flags & PERL_PV_PRETTY_NOCLEAR)) {
/* This won't alter the UTF-8 flag */
- sv_setpvs(dsv, "");
+ SvPVCLEAR(dsv);
}
orig_cur= SvCUR(dsv);
@@ -358,7 +358,7 @@ Perl_sv_peek(pTHX_ SV *sv)
int unref = 0;
U32 type;
- sv_setpvs(t, "");
+ SvPVCLEAR(t);
retry:
if (!sv) {
sv_catpv(t, "VOID");
@@ -1674,7 +1674,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)AvMAX(sv));
Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%"UVxf"\n",
SvMAGIC(sv) ? PTR2UV(AvARYLEN(sv)) : 0);
- sv_setpvs(d, "");
+ SvPVCLEAR(d);
if (AvREAL(sv)) sv_catpv(d, ",REAL");
if (AvREIFY(sv)) sv_catpv(d, ",REIFY");
Perl_dump_indent(aTHX_ level, file, " FLAGS = (%s)\n",