X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=dump.c;h=c9c9bb45073d1f9857934d14559ec3a8e67943c4;hb=d1bd4ef0a107c19b597b3c5d49a9b6836c36909f;hp=50304302324abf6021f5ff1c60a4790e803fc8a6;hpb=e9569a7a55e6b33419f56b3697245a199938eb42;p=p5sagit%2Fp5-mst-13.2.git diff --git a/dump.c b/dump.c index 5030430..c9c9bb4 100644 --- a/dump.c +++ b/dump.c @@ -296,21 +296,21 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str, |const U32 flags Converts a string into something presentable, handling escaping via -pv_escape() and supporting quoting and elipses. +pv_escape() and supporting quoting and ellipses. If the PERL_PV_PRETTY_QUOTE flag is set then the result will be double quoted with any double quotes in the string escaped. Otherwise if the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped in angle brackets. -If the PERL_PV_PRETTY_ELIPSES flag is set and not all characters in -string were output then an elipses C<...> will be appended to the +If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters in +string were output then an ellipsis C<...> will be appended to the string. Note that this happens AFTER it has been quoted. If start_color is non-null then it will be inserted after the opening quote (if there is one) but before the escaped text. If end_color is non-null then it will be inserted after the escaped text but before -any quotes or elipses. +any quotes or ellipses. Returns a pointer to the prettified text as held by dsv. @@ -345,7 +345,7 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count, else if ( flags & PERL_PV_PRETTY_LTGT ) sv_catpvn( dsv, ">", 1); - if ( (flags & PERL_PV_PRETTY_ELIPSES) && ( escaped < count ) ) + if ( (flags & PERL_PV_PRETTY_ELLIPSES) && ( escaped < count ) ) sv_catpvn( dsv, "...", 3 ); return SvPVX(dsv); @@ -631,7 +631,7 @@ S_sequence(pTHX_ register const OP *o) switch (o->op_type) { case OP_STUB: if ((o->op_flags & OPf_WANT) != OPf_WANT_LIST) { - hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); + (void)hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); break; } goto nothin; @@ -649,7 +649,7 @@ S_sequence(pTHX_ register const OP *o) nothin: if (oldop && o->op_next) continue; - hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); + (void)hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); break; case OP_MAPWHILE: @@ -662,20 +662,20 @@ S_sequence(pTHX_ register const OP *o) case OP_DORASSIGN: case OP_COND_EXPR: case OP_RANGE: - hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); + (void)hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); sequence_tail(cLOGOPo->op_other); break; case OP_ENTERLOOP: case OP_ENTERITER: - hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); + (void)hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); sequence_tail(cLOOPo->op_redoop); sequence_tail(cLOOPo->op_nextop); sequence_tail(cLOOPo->op_lastop); break; case OP_SUBST: - hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); + (void)hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); sequence_tail(cPMOPo->op_pmstashstartu.op_pmreplstart); break; @@ -685,7 +685,7 @@ S_sequence(pTHX_ register const OP *o) break; default: - hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); + (void)hv_store(Sequence, key, len, newSVuv(++PL_op_seq), 0); break; } oldop = o; @@ -1276,7 +1276,7 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32 SV * const dsv = sv_newmortal(); const char * const s = pv_pretty(dsv, re->wrapped, re->wraplen, 60, NULL, NULL, - ( PERL_PV_PRETTY_QUOTE | PERL_PV_ESCAPE_RE | PERL_PV_PRETTY_ELIPSES | + ( PERL_PV_PRETTY_QUOTE | PERL_PV_ESCAPE_RE | PERL_PV_PRETTY_ELLIPSES | ((re->extflags & RXf_UTF8) ? PERL_PV_ESCAPE_UNI : 0)) ); Perl_dump_indent(aTHX_ level+1, file, " PAT = %s\n", s);