mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
Stop calling Perl_sv_catpvf manually
Call sv_catpvf instead
This commit is contained in:
parent
410115a66c
commit
ba04a9040a
2
class.c
2
class.c
@ -230,7 +230,7 @@ XS(injected_constructor)
|
||||
SAVEFREESV(paramnames);
|
||||
|
||||
while((he = hv_iternext(params)))
|
||||
Perl_sv_catpvf(aTHX_ paramnames, ", %" SVf, SVfARG(HeSVKEY_force(he)));
|
||||
sv_catpvf(paramnames, ", %" SVf, SVfARG(HeSVKEY_force(he)));
|
||||
|
||||
croak("Unrecognised parameters for %" HvNAMEf_QUOTEDPREFIX " constructor: %" SVf,
|
||||
HvNAMEfARG(stash), SVfARG(paramnames));
|
||||
|
||||
10
dquote.c
10
dquote.c
@ -144,7 +144,7 @@ Perl_form_alien_digit_msg(pTHX_
|
||||
if (isPRINT(*first_bad)) {
|
||||
sv_catpvs(message_sv, "'");
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ message_sv, " terminates \\%c early. Resolved as "
|
||||
sv_catpvf(message_sv, " terminates \\%c early. Resolved as "
|
||||
"\"\\%c", symbol, symbol);
|
||||
if (braced) {
|
||||
sv_catpvs(message_sv, "{");
|
||||
@ -218,13 +218,13 @@ Perl_form_cp_too_large_msg(pTHX_
|
||||
|
||||
Perl_sv_setpvf(aTHX_ message_sv, "Use of code point %s", prefix);
|
||||
if (string) {
|
||||
Perl_sv_catpvf(aTHX_ message_sv, "%.*s", (int) len, string);
|
||||
sv_catpvf(message_sv, "%.*s", (int) len, string);
|
||||
}
|
||||
else {
|
||||
Perl_sv_catpvf(aTHX_ message_sv, format, cp);
|
||||
sv_catpvf(message_sv, format, cp);
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ message_sv, " is not allowed; the permissible max is %s", prefix);
|
||||
Perl_sv_catpvf(aTHX_ message_sv, format, MAX_LEGAL_CP);
|
||||
sv_catpvf(message_sv, " is not allowed; the permissible max is %s", prefix);
|
||||
sv_catpvf(message_sv, format, MAX_LEGAL_CP);
|
||||
|
||||
return SvPVX_const(message_sv);
|
||||
}
|
||||
|
||||
50
dump.c
50
dump.c
@ -302,7 +302,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
|
||||
if (restart) {
|
||||
/* this only happens with PERL_PV_ESCAPE_TRUNC_MIDDLE */
|
||||
if (dsv)
|
||||
Perl_sv_catpvf( aTHX_ dsv,"%s...%s", qe, qs);
|
||||
sv_catpvf( dsv,"%s...%s", qe, qs);
|
||||
wrote += extra_len;
|
||||
pv = restart;
|
||||
max = tail;
|
||||
@ -323,7 +323,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
|
||||
how to keep it clear that it's unlike the s of catpvs, which is
|
||||
really an array of octets, not a string. */
|
||||
if (dsv)
|
||||
Perl_sv_catpvf( aTHX_ dsv, "%c", c);
|
||||
sv_catpvf( dsv, "%c", c);
|
||||
wrote++;
|
||||
}
|
||||
if ( flags & PERL_PV_ESCAPE_FIRSTCHAR )
|
||||
@ -382,7 +382,7 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
|
||||
orig_cur= SvCUR(dsv);
|
||||
|
||||
if ( quotes )
|
||||
Perl_sv_catpvf(aTHX_ dsv, "%c", quotes[0]);
|
||||
sv_catpvf(dsv, "%c", quotes[0]);
|
||||
|
||||
if ( start_color != NULL )
|
||||
sv_catpv(dsv, start_color);
|
||||
@ -403,7 +403,7 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
|
||||
sv_catpv(dsv, end_color);
|
||||
|
||||
if ( quotes )
|
||||
Perl_sv_catpvf(aTHX_ dsv, "%c", quotes[1]);
|
||||
sv_catpvf(dsv, "%c", quotes[1]);
|
||||
|
||||
if ( (flags & PERL_PV_PRETTY_ELLIPSES) && ( escaped < count ) )
|
||||
sv_catpvs(dsv, "...");
|
||||
@ -540,14 +540,14 @@ Perl_sv_peek(pTHX_ SV *sv)
|
||||
}
|
||||
}
|
||||
if (is_tmp || SvREFCNT(sv) > 1 || SvPADTMP(sv)) {
|
||||
Perl_sv_catpvf(aTHX_ t, "<");
|
||||
sv_catpvf(t, "<");
|
||||
if (SvREFCNT(sv) > 1)
|
||||
Perl_sv_catpvf(aTHX_ t, "%" UVuf, (UV)SvREFCNT(sv));
|
||||
sv_catpvf(t, "%" UVuf, (UV)SvREFCNT(sv));
|
||||
if (SvPADTMP(sv))
|
||||
Perl_sv_catpvf(aTHX_ t, "%s", "P");
|
||||
sv_catpvf(t, "%s", "P");
|
||||
if (is_tmp)
|
||||
Perl_sv_catpvf(aTHX_ t, "%s", SvTEMP(t) ? "T" : "t");
|
||||
Perl_sv_catpvf(aTHX_ t, ">");
|
||||
sv_catpvf(t, "%s", SvTEMP(t) ? "T" : "t");
|
||||
sv_catpvf(t, ">");
|
||||
}
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ Perl_sv_peek(pTHX_ SV *sv)
|
||||
if (type == SVt_PVCV) {
|
||||
SV * const tmp = newSVpvs_flags("", SVs_TEMP);
|
||||
GV* gvcv = CvGV(sv);
|
||||
Perl_sv_catpvf(aTHX_ t, "CV(%s)", gvcv
|
||||
sv_catpvf(t, "CV(%s)", gvcv
|
||||
? generic_pv_escape( tmp, GvNAME(gvcv), GvNAMELEN(gvcv), GvNAMEUTF8(gvcv))
|
||||
: "");
|
||||
goto finish;
|
||||
@ -589,11 +589,11 @@ Perl_sv_peek(pTHX_ SV *sv)
|
||||
if (SvOOK(sv)) {
|
||||
STRLEN delta;
|
||||
SvOOK_offset(sv, delta);
|
||||
Perl_sv_catpvf(aTHX_ t, "[%s]", pv_display(tmp, SvPVX_const(sv)-delta, delta, 0, 127));
|
||||
sv_catpvf(t, "[%s]", pv_display(tmp, SvPVX_const(sv)-delta, delta, 0, 127));
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ t, "%s)", pv_display(tmp, SvPVX_const(sv), SvCUR(sv), SvLEN(sv), 127));
|
||||
sv_catpvf(t, "%s)", pv_display(tmp, SvPVX_const(sv), SvCUR(sv), SvLEN(sv), 127));
|
||||
if (SvUTF8(sv))
|
||||
Perl_sv_catpvf(aTHX_ t, " [UTF8 \"%s\"]",
|
||||
sv_catpvf(t, " [UTF8 \"%s\"]",
|
||||
sv_uni_display(tmp, sv, 6 * SvCUR(sv),
|
||||
UNI_DISPLAY_QQ));
|
||||
SvREFCNT_dec_NN(tmp);
|
||||
@ -602,14 +602,14 @@ Perl_sv_peek(pTHX_ SV *sv)
|
||||
else if (SvNOKp(sv)) {
|
||||
DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
|
||||
STORE_LC_NUMERIC_SET_STANDARD();
|
||||
Perl_sv_catpvf(aTHX_ t, "(%" NVgf ")",SvNVX(sv));
|
||||
sv_catpvf(t, "(%" NVgf ")",SvNVX(sv));
|
||||
RESTORE_LC_NUMERIC();
|
||||
}
|
||||
else if (SvIOKp(sv)) {
|
||||
if (SvIsUV(sv))
|
||||
Perl_sv_catpvf(aTHX_ t, "(%" UVuf ")", (UV)SvUVX(sv));
|
||||
sv_catpvf(t, "(%" UVuf ")", (UV)SvUVX(sv));
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ t, "(%" IVdf ")", (IV)SvIVX(sv));
|
||||
sv_catpvf(t, "(%" IVdf ")", (IV)SvIVX(sv));
|
||||
}
|
||||
else
|
||||
sv_catpvs(t, "()");
|
||||
@ -952,7 +952,7 @@ S_gv_display(pTHX_ GV *gv)
|
||||
if (isGV_with_GP(gv))
|
||||
gv_fullname3(raw, gv, NULL);
|
||||
else {
|
||||
Perl_sv_catpvf(aTHX_ raw, "cv ref: %s",
|
||||
sv_catpvf(raw, "cv ref: %s",
|
||||
SvPV_nolen_const(cv_name(CV_FROM_REF((SV*)gv), name, 0)));
|
||||
}
|
||||
rawpv = SvPV_const(raw, len);
|
||||
@ -1312,7 +1312,7 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const OP *o)
|
||||
sv_catpvs(tmpsv, "=");
|
||||
}
|
||||
if (enum_label == -1)
|
||||
Perl_sv_catpvf(aTHX_ tmpsv, "0x%" UVxf, (UV)val);
|
||||
sv_catpvf(tmpsv, "0x%" UVxf, (UV)val);
|
||||
else
|
||||
sv_catpv(tmpsv, &PL_op_private_labels[enum_label]);
|
||||
|
||||
@ -1331,7 +1331,7 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const OP *o)
|
||||
}
|
||||
if (oppriv) {
|
||||
sv_catpvs(tmpsv, ",");
|
||||
Perl_sv_catpvf(aTHX_ tmpsv, "0x%" UVxf, (UV)oppriv);
|
||||
sv_catpvf(tmpsv, "0x%" UVxf, (UV)oppriv);
|
||||
}
|
||||
}
|
||||
if (tmpsv && SvCUR(tmpsv)) {
|
||||
@ -2430,7 +2430,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
|
||||
while (hekp < endp) {
|
||||
if (*hekp) {
|
||||
SV *tmp = newSVpvs_flags("", SVs_TEMP);
|
||||
Perl_sv_catpvf(aTHX_ names, ", \"%s\"",
|
||||
sv_catpvf(names, ", \"%s\"",
|
||||
generic_pv_escape(tmp, HEK_KEY(*hekp), HEK_LEN(*hekp), HEK_UTF8(*hekp)));
|
||||
} else {
|
||||
/* This should never happen. */
|
||||
@ -3071,14 +3071,14 @@ S_append_padvar(pTHX_ PADOFFSET off, CV *cv, SV *out, int n,
|
||||
if (namepad && (sv = padnamelist_fetch(namepad, off + i)))
|
||||
{
|
||||
STRLEN cur = SvCUR(out);
|
||||
Perl_sv_catpvf(aTHX_ out, "[%" UTF8f,
|
||||
sv_catpvf(out, "[%" UTF8f,
|
||||
UTF8fARG(1, PadnameLEN(sv) - 1,
|
||||
PadnamePV(sv) + 1));
|
||||
if (is_scalar)
|
||||
SvPVX(out)[cur] = '$';
|
||||
}
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ out, "[%" UVuf "]", (UV)(off+i));
|
||||
sv_catpvf(out, "[%" UVuf "]", (UV)(off+i));
|
||||
if (i < n - 1)
|
||||
sv_catpvs_nomg(out, ",");
|
||||
}
|
||||
@ -3097,7 +3097,7 @@ S_append_gv_name(pTHX_ GV *gv, SV *out)
|
||||
}
|
||||
sv = newSV_type(SVt_NULL);
|
||||
gv_fullname4(sv, gv, NULL, FALSE);
|
||||
Perl_sv_catpvf(aTHX_ out, "$%" SVf, SVfARG(sv));
|
||||
sv_catpvf(out, "$%" SVf, SVfARG(sv));
|
||||
SvREFCNT_dec_NN(sv);
|
||||
}
|
||||
|
||||
@ -3218,7 +3218,7 @@ Perl_multideref_stringify(pTHX_ const OP *o, CV *cv)
|
||||
}
|
||||
}
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ out, "%" IVdf, (++items)->iv);
|
||||
sv_catpvf(out, "%" IVdf, (++items)->iv);
|
||||
break;
|
||||
case MDEREF_INDEX_padsv:
|
||||
S_append_padvar(aTHX_ (++items)->pad_offset, cv, out, 1, 0, 1);
|
||||
@ -3285,7 +3285,7 @@ Perl_multiconcat_stringify(pTHX_ const OP *o)
|
||||
|
||||
lens = aux + PERL_MULTICONCAT_IX_LENGTHS;
|
||||
while (nargs-- >= 0) {
|
||||
Perl_sv_catpvf(aTHX_ out, ",%" IVdf, (IV)lens->ssize);
|
||||
sv_catpvf(out, ",%" IVdf, (IV)lens->ssize);
|
||||
lens++;
|
||||
}
|
||||
return out;
|
||||
|
||||
8
locale.c
8
locale.c
@ -4035,14 +4035,14 @@ S_new_ctype(pTHX_ const char *newctype, bool force)
|
||||
}
|
||||
|
||||
if (PL_in_utf8_CTYPE_locale) {
|
||||
Perl_sv_catpvf(aTHX_ PL_warn_locale,
|
||||
sv_catpvf(PL_warn_locale,
|
||||
"Locale '%s' contains (at least) the following characters"
|
||||
" which have\nunexpected meanings: %s\nThe Perl program"
|
||||
" will use the expected meanings",
|
||||
newctype, bad_chars_list);
|
||||
}
|
||||
else {
|
||||
Perl_sv_catpvf(aTHX_ PL_warn_locale,
|
||||
sv_catpvf(PL_warn_locale,
|
||||
"\nThe following characters (and maybe"
|
||||
" others) may not have the same meaning as"
|
||||
" the Perl program expects: %s\n",
|
||||
@ -4052,12 +4052,12 @@ S_new_ctype(pTHX_ const char *newctype, bool force)
|
||||
|
||||
# if defined(HAS_SOME_LANGINFO) || defined(WIN32)
|
||||
|
||||
Perl_sv_catpvf(aTHX_ PL_warn_locale, "; codeset=%s",
|
||||
sv_catpvf(PL_warn_locale, "; codeset=%s",
|
||||
langinfo_c(CODESET, LC_CTYPE, newctype, NULL));
|
||||
|
||||
# endif
|
||||
|
||||
Perl_sv_catpvf(aTHX_ PL_warn_locale, "\n");
|
||||
sv_catpvf(PL_warn_locale, "\n");
|
||||
|
||||
/* If we are actually in the scope of the locale or are debugging,
|
||||
* output the message now. If not in that scope, we save the
|
||||
|
||||
2
mg.c
2
mg.c
@ -1261,7 +1261,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
|
||||
Newx(gary, num_groups, Groups_t);
|
||||
num_groups = getgroups(num_groups, gary);
|
||||
for (i = 0; i < num_groups; i++)
|
||||
Perl_sv_catpvf(aTHX_ sv, " %" IVdf, (IV)gary[i]);
|
||||
sv_catpvf(sv, " %" IVdf, (IV)gary[i]);
|
||||
Safefree(gary);
|
||||
}
|
||||
}
|
||||
|
||||
8
op.c
8
op.c
@ -6588,7 +6588,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
|
||||
sv_catpvn(inverted_tstr, (char *) temp, temp_end_pos - temp);
|
||||
|
||||
if (start != end) {
|
||||
Perl_sv_catpvf(aTHX_ inverted_tstr, "%c", RANGE_INDICATOR);
|
||||
sv_catpvf(inverted_tstr, "%c", RANGE_INDICATOR);
|
||||
temp_end_pos = uv_to_utf8(temp, end);
|
||||
sv_catpvn(inverted_tstr, (char *) temp, temp_end_pos - temp);
|
||||
}
|
||||
@ -10383,16 +10383,16 @@ Perl_cv_ckproto_len_flags(pTHX_ const CV *cv, const GV *gv, const char *p,
|
||||
}
|
||||
sv_setpvs(msg, "Prototype mismatch:");
|
||||
if (name)
|
||||
Perl_sv_catpvf(aTHX_ msg, " sub %" SVf, SVfARG(name));
|
||||
sv_catpvf(msg, " sub %" SVf, SVfARG(name));
|
||||
if (cvp)
|
||||
Perl_sv_catpvf(aTHX_ msg, " (%" UTF8f ")",
|
||||
sv_catpvf(msg, " (%" UTF8f ")",
|
||||
UTF8fARG(SvUTF8(cv),clen,cvp)
|
||||
);
|
||||
else
|
||||
sv_catpvs(msg, ": none");
|
||||
sv_catpvs(msg, " vs ");
|
||||
if (p)
|
||||
Perl_sv_catpvf(aTHX_ msg, "(%" UTF8f ")", UTF8fARG(flags & SVf_UTF8,len,p));
|
||||
sv_catpvf(msg, "(%" UTF8f ")", UTF8fARG(flags & SVf_UTF8,len,p));
|
||||
else
|
||||
sv_catpvs(msg, "none");
|
||||
Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%" SVf, SVfARG(msg));
|
||||
|
||||
6
perl.c
6
perl.c
@ -3786,7 +3786,7 @@ Perl_moreswitches(pTHX_ const char *s)
|
||||
sv_catpvn(sv, start, s-start);
|
||||
/* Don't use NUL as q// delimiter here, this string goes in the
|
||||
* environment. */
|
||||
Perl_sv_catpvf(aTHX_ sv, " split(/,/,q{%s});", ++s);
|
||||
sv_catpvf(sv, " split(/,/,q{%s});", ++s);
|
||||
}
|
||||
s = end;
|
||||
my_setenv("PERL5DB", SvPV_nolen_const(sv));
|
||||
@ -5190,7 +5190,7 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
|
||||
if (addoldvers) {
|
||||
for (incver = incverlist; *incver; incver++) {
|
||||
/* .../xxx if -d .../xxx */
|
||||
Perl_sv_catpvf(aTHX_ subdir, "/%s", *incver);
|
||||
sv_catpvf(subdir, "/%s", *incver);
|
||||
subdir = S_incpush_if_exists(aTHX_ av, subdir, libdir);
|
||||
}
|
||||
}
|
||||
@ -5328,7 +5328,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
|
||||
if (paramList == PL_beginav)
|
||||
sv_catpvs(atsv, "BEGIN failed--compilation aborted");
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ atsv,
|
||||
sv_catpvf(atsv,
|
||||
"%s failed--call queue aborted",
|
||||
paramList == PL_checkav ? "CHECK"
|
||||
: paramList == PL_initav ? "INIT"
|
||||
|
||||
26
regcomp.c
26
regcomp.c
@ -9114,10 +9114,10 @@ redo_curchar:
|
||||
result_string = newSVpvs("");
|
||||
while (invlist_iternext(final, &start, &end)) {
|
||||
if (start == end) {
|
||||
Perl_sv_catpvf(aTHX_ result_string, "\\x{%" UVXf "}", start);
|
||||
sv_catpvf(result_string, "\\x{%" UVXf "}", start);
|
||||
}
|
||||
else {
|
||||
Perl_sv_catpvf(aTHX_ result_string, "\\x{%" UVXf "}-\\x{%"
|
||||
sv_catpvf(result_string, "\\x{%" UVXf "}-\\x{%"
|
||||
UVXf "}", start, end);
|
||||
}
|
||||
}
|
||||
@ -10013,7 +10013,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
|
||||
if (cp > 255) {
|
||||
REQUIRE_UTF8(flagp);
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ final, "\\x{%" UVXf "}",
|
||||
sv_catpvf(final, "\\x{%" UVXf "}",
|
||||
cp);
|
||||
SvREFCNT_dec_NN(character);
|
||||
}
|
||||
@ -10522,7 +10522,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
|
||||
foldbuf + foldlen);
|
||||
SV* multi_fold = newSVpvs_flags("", SVs_TEMP);
|
||||
|
||||
Perl_sv_catpvf(aTHX_ multi_fold, "\\x{%" UVXf "}", value);
|
||||
sv_catpvf(multi_fold, "\\x{%" UVXf "}", value);
|
||||
|
||||
multi_char_matches
|
||||
= add_multi_match(multi_char_matches,
|
||||
@ -14295,7 +14295,7 @@ S_handle_user_defined_property(pTHX_
|
||||
}
|
||||
if (SvCUR(msg) > 0) sv_catpvs(msg, "; ");
|
||||
sv_catpv(msg, overflow_msg);
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f,
|
||||
sv_catpvf(msg, "%" UTF8f,
|
||||
UTF8fARG(is_contents_utf8, s - s0, s0));
|
||||
sv_catpvs(msg, "\"");
|
||||
goto return_failure;
|
||||
@ -14330,7 +14330,7 @@ S_handle_user_defined_property(pTHX_
|
||||
}
|
||||
if (SvCUR(msg) > 0) sv_catpvs(msg, "; ");
|
||||
sv_catpv(msg, overflow_msg);
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f,
|
||||
sv_catpvf(msg, "%" UTF8f,
|
||||
UTF8fARG(is_contents_utf8, s - s0, s0));
|
||||
sv_catpvs(msg, "\"");
|
||||
goto return_failure;
|
||||
@ -14358,7 +14358,7 @@ S_handle_user_defined_property(pTHX_
|
||||
else if (max < min) {
|
||||
if (SvCUR(msg) > 0) sv_catpvs(msg, "; ");
|
||||
sv_catpvs(msg, "Illegal range in \"");
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f,
|
||||
sv_catpvf(msg, "%" UTF8f,
|
||||
UTF8fARG(is_contents_utf8, s - s0, s0));
|
||||
sv_catpvs(msg, "\"");
|
||||
goto return_failure;
|
||||
@ -14377,7 +14377,7 @@ S_handle_user_defined_property(pTHX_
|
||||
(UNICODE_IS_PERL_EXTENDED(min))
|
||||
? min : max));
|
||||
sv_catpvs(msg, " in \"");
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f,
|
||||
sv_catpvf(msg, "%" UTF8f,
|
||||
UTF8fARG(is_contents_utf8, s - s0, s0));
|
||||
sv_catpvs(msg, "\"");
|
||||
}
|
||||
@ -14484,7 +14484,7 @@ S_handle_user_defined_property(pTHX_
|
||||
|
||||
if (name_len > 0) {
|
||||
sv_catpvs(msg, " in expansion of ");
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f, UTF8fARG(is_utf8, name_len, name));
|
||||
sv_catpvf(msg, "%" UTF8f, UTF8fARG(is_utf8, name_len, name));
|
||||
}
|
||||
|
||||
return running_definition;
|
||||
@ -14558,12 +14558,12 @@ S_get_fq_name(pTHX_
|
||||
: CopSTASH(PL_curcop);
|
||||
const char* pkgname = HvNAME(pkg);
|
||||
|
||||
Perl_sv_catpvf(aTHX_ fq_name, "%" UTF8f,
|
||||
sv_catpvf(fq_name, "%" UTF8f,
|
||||
UTF8fARG(is_utf8, strlen(pkgname), pkgname));
|
||||
sv_catpvs(fq_name, "::");
|
||||
}
|
||||
|
||||
Perl_sv_catpvf(aTHX_ fq_name, "%" UTF8f,
|
||||
sv_catpvf(fq_name, "%" UTF8f,
|
||||
UTF8fARG(is_utf8, name_len, name));
|
||||
return fq_name;
|
||||
}
|
||||
@ -15535,7 +15535,7 @@ S_parse_uniprop_string(pTHX_
|
||||
|
||||
if (name_len > 0) {
|
||||
sv_catpvs(msg, " in expansion of ");
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f, UTF8fARG(is_utf8,
|
||||
sv_catpvf(msg, "%" UTF8f, UTF8fARG(is_utf8,
|
||||
name_len,
|
||||
name));
|
||||
}
|
||||
@ -15948,7 +15948,7 @@ S_parse_uniprop_string(pTHX_
|
||||
const char * suffix = (runtime && level == 0) ? "}" : "\"";
|
||||
|
||||
sv_catpv(msg, prefix);
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" UTF8f, UTF8fARG(is_utf8, name_len, name));
|
||||
sv_catpvf(msg, "%" UTF8f, UTF8fARG(is_utf8, name_len, name));
|
||||
sv_catpv(msg, suffix);
|
||||
}
|
||||
|
||||
|
||||
104
regcomp_debug.c
104
regcomp_debug.c
@ -555,10 +555,10 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
|
||||
k = REGNODE_TYPE(op);
|
||||
if (op == BRANCH) {
|
||||
Perl_sv_catpvf(aTHX_ sv, " (buf:%" IVdf "/%" IVdf ")", (IV)ARG1a(o),(IV)ARG1b(o));
|
||||
sv_catpvf(sv, " (buf:%" IVdf "/%" IVdf ")", (IV)ARG1a(o),(IV)ARG1b(o));
|
||||
}
|
||||
else if (op == BRANCHJ) {
|
||||
Perl_sv_catpvf(aTHX_ sv, " (buf:%" IVdf "/%" IVdf ")", (IV)ARG2a(o),(IV)ARG2b(o));
|
||||
sv_catpvf(sv, " (buf:%" IVdf "/%" IVdf ")", (IV)ARG2a(o),(IV)ARG2b(o));
|
||||
}
|
||||
else if (k == EXACT) {
|
||||
sv_catpvs(sv, " ");
|
||||
@ -584,11 +584,11 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
const reg_trie_data * const trie
|
||||
= (reg_trie_data*)progi->data->data[!IS_TRIE_AC(op) ? n : ac->trie];
|
||||
|
||||
Perl_sv_catpvf(aTHX_ sv, "-%s", REGNODE_NAME(FLAGS(o)));
|
||||
sv_catpvf(sv, "-%s", REGNODE_NAME(FLAGS(o)));
|
||||
DEBUG_TRIE_COMPILE_r({
|
||||
if (trie->jump)
|
||||
sv_catpvs(sv, "(JUMP)");
|
||||
Perl_sv_catpvf(aTHX_ sv,
|
||||
sv_catpvf(sv,
|
||||
"<S:%" UVuf "/%" IVdf " W:%" UVuf " L:%" UVuf "/%" UVuf " C:%" UVuf "/%" UVuf ">",
|
||||
(UV)trie->startstate,
|
||||
(IV)trie->statecount-1, /* -1 because of the unused 0 element */
|
||||
@ -614,23 +614,23 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
sv_catpvs(sv, "]");
|
||||
}
|
||||
if (trie->before_paren || trie->after_paren)
|
||||
Perl_sv_catpvf(aTHX_ sv, " (buf:%" IVdf "/%" IVdf ")",
|
||||
sv_catpvf(sv, " (buf:%" IVdf "/%" IVdf ")",
|
||||
(IV)trie->before_paren,(IV)trie->after_paren);
|
||||
} else if (k == CURLY) {
|
||||
U32 lo = ARG1i(o), hi = ARG2i(o);
|
||||
if (ARG3u(o)) /* check both ARG3a and ARG3b at the same time */
|
||||
Perl_sv_catpvf(aTHX_ sv, "<%d:%d>", ARG3a(o),ARG3b(o)); /* paren before, paren after */
|
||||
sv_catpvf(sv, "<%d:%d>", ARG3a(o),ARG3b(o)); /* paren before, paren after */
|
||||
if (op == CURLYM || op == CURLYN || op == CURLYX)
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%d]", FLAGS(o)); /* Parenth number */
|
||||
Perl_sv_catpvf(aTHX_ sv, "{%u,", (unsigned) lo);
|
||||
sv_catpvf(sv, "[%d]", FLAGS(o)); /* Parenth number */
|
||||
sv_catpvf(sv, "{%u,", (unsigned) lo);
|
||||
if (hi == REG_INFTY)
|
||||
sv_catpvs(sv, "INFTY");
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ sv, "%u", (unsigned) hi);
|
||||
sv_catpvf(sv, "%u", (unsigned) hi);
|
||||
sv_catpvs(sv, "}");
|
||||
}
|
||||
else if (k == WHILEM && FLAGS(o)) /* Ordinal/of */
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%d/%d]", FLAGS(o) & 0xf, FLAGS(o)>>4);
|
||||
sv_catpvf(sv, "[%d/%d]", FLAGS(o) & 0xf, FLAGS(o)>>4);
|
||||
else if (k == REF || k == OPEN || k == CLOSE
|
||||
|| k == GROUPP || op == ACCEPT)
|
||||
{
|
||||
@ -649,13 +649,13 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
if (prog->parno_to_logical)
|
||||
logical_parno = prog->parno_to_logical[parno];
|
||||
|
||||
Perl_sv_catpvf(aTHX_ sv, "%" UVuf, (UV)logical_parno); /* Parenth number */
|
||||
sv_catpvf(sv, "%" UVuf, (UV)logical_parno); /* Parenth number */
|
||||
if (parno != logical_parno)
|
||||
Perl_sv_catpvf(aTHX_ sv, "/%" UVuf, (UV)parno); /* Parenth number */
|
||||
sv_catpvf(sv, "/%" UVuf, (UV)parno); /* Parenth number */
|
||||
|
||||
SV **name= av_fetch_simple(name_list, parno, 0 );
|
||||
if (name)
|
||||
Perl_sv_catpvf(aTHX_ sv, " '%" SVf "'", SVfARG(*name));
|
||||
sv_catpvf(sv, " '%" SVf "'", SVfARG(*name));
|
||||
}
|
||||
else
|
||||
if (parno > 0) {
|
||||
@ -672,10 +672,10 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
I32 n;
|
||||
if (name) {
|
||||
for ( n = 0; n < SvIVX(sv_dat); n++ ) {
|
||||
Perl_sv_catpvf(aTHX_ sv, "%s%" IVdf,
|
||||
sv_catpvf(sv, "%s%" IVdf,
|
||||
(n ? "," : ""), (IV)nums[n]);
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ sv, " '%" SVf "'", SVfARG(*name));
|
||||
sv_catpvf(sv, " '%" SVf "'", SVfARG(*name));
|
||||
}
|
||||
}
|
||||
} else if (parno > 0) {
|
||||
@ -683,24 +683,24 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
if (prog->parno_to_logical)
|
||||
logical_parno = prog->parno_to_logical[parno];
|
||||
|
||||
Perl_sv_catpvf(aTHX_ sv, "%" UVuf, (UV)logical_parno); /* Parenth number */
|
||||
sv_catpvf(sv, "%" UVuf, (UV)logical_parno); /* Parenth number */
|
||||
if (logical_parno != parno)
|
||||
Perl_sv_catpvf(aTHX_ sv, "/%" UVuf, (UV)parno); /* Parenth number */
|
||||
sv_catpvf(sv, "/%" UVuf, (UV)parno); /* Parenth number */
|
||||
|
||||
}
|
||||
if ( k == REF ) {
|
||||
Perl_sv_catpvf(aTHX_ sv, " <%" IVdf ">", (IV)ARG2i(o));
|
||||
sv_catpvf(sv, " <%" IVdf ">", (IV)ARG2i(o));
|
||||
}
|
||||
if ( k == REF && reginfo) {
|
||||
U32 n = ARG1u(o); /* which paren pair */
|
||||
I32 ln = RXp_OFFS_START(prog,n);
|
||||
if (RXp_LASTPAREN(prog) < n || ln == -1 || RXp_OFFS_END(prog,n) == -1)
|
||||
Perl_sv_catpvf(aTHX_ sv, ": FAIL");
|
||||
sv_catpvf(sv, ": FAIL");
|
||||
else if (ln == RXp_OFFS_END(prog,n))
|
||||
Perl_sv_catpvf(aTHX_ sv, ": ACCEPT - EMPTY STRING");
|
||||
sv_catpvf(sv, ": ACCEPT - EMPTY STRING");
|
||||
else {
|
||||
const char *s = reginfo->strbeg + ln;
|
||||
Perl_sv_catpvf(aTHX_ sv, ": ");
|
||||
sv_catpvf(sv, ": ");
|
||||
Perl_pv_pretty( aTHX_ sv, s, RXp_OFFS_END(prog,n) - RXp_OFFS_START(prog,n), 32, 0, 0,
|
||||
PERL_PV_ESCAPE_UNI_DETECT|PERL_PV_PRETTY_NOCLEAR|PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE );
|
||||
}
|
||||
@ -718,21 +718,21 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
}
|
||||
|
||||
/* Paren and offset */
|
||||
Perl_sv_catpvf(aTHX_ sv, "%" IVdf, logical_parno);
|
||||
sv_catpvf(sv, "%" IVdf, logical_parno);
|
||||
if (logical_parno != parno)
|
||||
Perl_sv_catpvf(aTHX_ sv, "/%" IVdf, parno);
|
||||
sv_catpvf(sv, "/%" IVdf, parno);
|
||||
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%+d:%d]", (int)ARG2i(o),
|
||||
sv_catpvf(sv, "[%+d:%d]", (int)ARG2i(o),
|
||||
(int)((o + (int)ARG2i(o)) - progi->program) );
|
||||
if (name_list) {
|
||||
SV **name= av_fetch_simple(name_list, ARG1u(o), 0 );
|
||||
if (name)
|
||||
Perl_sv_catpvf(aTHX_ sv, " '%" SVf "'", SVfARG(*name));
|
||||
sv_catpvf(sv, " '%" SVf "'", SVfARG(*name));
|
||||
}
|
||||
}
|
||||
else if (k == LOGICAL)
|
||||
/* 2: embedded, otherwise 1 */
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%d]", FLAGS(o));
|
||||
sv_catpvf(sv, "[%d]", FLAGS(o));
|
||||
else if (k == ANYOF || k == ANYOFH || k == ANYOFR) {
|
||||
U8 flags;
|
||||
char * bitmap;
|
||||
@ -826,7 +826,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
}
|
||||
|
||||
/* Ready to start outputting. First, the initial left bracket */
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%s", PL_colors[0]);
|
||||
sv_catpvf(sv, "[%s", PL_colors[0]);
|
||||
|
||||
if ( bitmap
|
||||
|| bitmap_range_not_in_bitmap
|
||||
@ -865,7 +865,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
sv_catpvs(sv, "{");
|
||||
}
|
||||
else if (do_sep) {
|
||||
Perl_sv_catpvf(aTHX_ sv,"%s][%s", PL_colors[1],
|
||||
sv_catpvf(sv,"%s][%s", PL_colors[1],
|
||||
PL_colors[0]);
|
||||
}
|
||||
sv_catsv(sv, unresolved);
|
||||
@ -899,7 +899,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
|
||||
/* This is output in a separate [] */
|
||||
if (do_sep) {
|
||||
Perl_sv_catpvf(aTHX_ sv,"%s][%s", PL_colors[1], PL_colors[0]);
|
||||
sv_catpvf(sv,"%s][%s", PL_colors[1], PL_colors[0]);
|
||||
}
|
||||
|
||||
/* And, for easy of understanding, it is shown in the
|
||||
@ -942,10 +942,10 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
}
|
||||
|
||||
/* And finally the matching, closing ']' */
|
||||
Perl_sv_catpvf(aTHX_ sv, "%s]", PL_colors[1]);
|
||||
sv_catpvf(sv, "%s]", PL_colors[1]);
|
||||
|
||||
if (op == ANYOFHs) {
|
||||
Perl_sv_catpvf(aTHX_ sv, " (Leading UTF-8 bytes = %s",
|
||||
sv_catpvf(sv, " (Leading UTF-8 bytes = %s",
|
||||
_byte_dump_string((U8 *) ((struct regnode_anyofhs *) o)->string,
|
||||
FLAGS(o), 1));
|
||||
}
|
||||
@ -962,11 +962,11 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
if (op != ANYOFR || ! isASCII(ANYOFRbase(o) + ANYOFRdelta(o)))
|
||||
#endif
|
||||
{
|
||||
Perl_sv_catpvf(aTHX_ sv, " (First UTF-8 byte = %02X", lowest);
|
||||
sv_catpvf(sv, " (First UTF-8 byte = %02X", lowest);
|
||||
if (lowest != highest) {
|
||||
Perl_sv_catpvf(aTHX_ sv, "-%02X", highest);
|
||||
sv_catpvf(sv, "-%02X", highest);
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ sv, ")");
|
||||
sv_catpvf(sv, ")");
|
||||
}
|
||||
}
|
||||
|
||||
@ -975,24 +975,24 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
else if (k == ANYOFM) {
|
||||
SV * cp_list = get_ANYOFM_contents(o);
|
||||
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%s", PL_colors[0]);
|
||||
sv_catpvf(sv, "[%s", PL_colors[0]);
|
||||
if (op == NANYOFM) {
|
||||
_invlist_invert(cp_list);
|
||||
}
|
||||
|
||||
put_charclass_bitmap_innards(sv, NULL, cp_list, NULL, NULL, 0, true);
|
||||
Perl_sv_catpvf(aTHX_ sv, "%s]", PL_colors[1]);
|
||||
sv_catpvf(sv, "%s]", PL_colors[1]);
|
||||
|
||||
SvREFCNT_dec(cp_list);
|
||||
}
|
||||
else if (k == ANYOFHbbm) {
|
||||
SV * cp_list = get_ANYOFHbbm_contents(o);
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%s", PL_colors[0]);
|
||||
sv_catpvf(sv, "[%s", PL_colors[0]);
|
||||
|
||||
sv_catsv(sv, invlist_contents(cp_list,
|
||||
false /* output suitable for catsv */
|
||||
));
|
||||
Perl_sv_catpvf(aTHX_ sv, "%s]", PL_colors[1]);
|
||||
sv_catpvf(sv, "%s]", PL_colors[1]);
|
||||
|
||||
SvREFCNT_dec(cp_list);
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
}
|
||||
}
|
||||
else {
|
||||
Perl_sv_catpvf(aTHX_ sv, "[illegal type = %d])", index);
|
||||
sv_catpvf(sv, "[illegal type = %d])", index);
|
||||
}
|
||||
}
|
||||
else if (k == BOUND || k == NBOUND) {
|
||||
@ -1024,23 +1024,23 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
|
||||
sv_catpv(sv, bounds[FLAGS(o)]);
|
||||
}
|
||||
else if (k == BRANCHJ && (op == UNLESSM || op == IFMATCH)) {
|
||||
Perl_sv_catpvf(aTHX_ sv, "[%d", -(FLAGS(o)));
|
||||
sv_catpvf(sv, "[%d", -(FLAGS(o)));
|
||||
if (NEXT_OFF(o)) {
|
||||
Perl_sv_catpvf(aTHX_ sv, "..-%d", FLAGS(o) - NEXT_OFF(o));
|
||||
sv_catpvf(sv, "..-%d", FLAGS(o) - NEXT_OFF(o));
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ sv, "]");
|
||||
sv_catpvf(sv, "]");
|
||||
}
|
||||
else if (op == SBOL)
|
||||
Perl_sv_catpvf(aTHX_ sv, " /%s/", FLAGS(o) ? "\\A" : "^");
|
||||
sv_catpvf(sv, " /%s/", FLAGS(o) ? "\\A" : "^");
|
||||
else if (op == EVAL) {
|
||||
if (FLAGS(o) & EVAL_OPTIMISTIC_FLAG)
|
||||
Perl_sv_catpvf(aTHX_ sv, " optimistic");
|
||||
sv_catpvf(sv, " optimistic");
|
||||
}
|
||||
|
||||
/* add on the verb argument if there is one */
|
||||
if ( ( k == VERB || op == ACCEPT || op == OPFAIL ) && FLAGS(o)) {
|
||||
if ( ARG1u(o) )
|
||||
Perl_sv_catpvf(aTHX_ sv, ":%" SVf,
|
||||
sv_catpvf(sv, ":%" SVf,
|
||||
SVfARG((MUTABLE_SV(progi->data->data[ ARG1u( o ) ]))));
|
||||
else
|
||||
sv_catpvs(sv, ":NULL");
|
||||
@ -1063,7 +1063,7 @@ S_put_code_point(pTHX_ SV *sv, UV c)
|
||||
PERL_ARGS_ASSERT_PUT_CODE_POINT;
|
||||
|
||||
if (c > 255) {
|
||||
Perl_sv_catpvf(aTHX_ sv, "\\x{%04" UVXf "}", c);
|
||||
sv_catpvf(sv, "\\x{%04" UVXf "}", c);
|
||||
}
|
||||
else if (isPRINT(c)) {
|
||||
const char string = (char) c;
|
||||
@ -1075,10 +1075,10 @@ S_put_code_point(pTHX_ SV *sv, UV c)
|
||||
sv_catpvn(sv, &string, 1);
|
||||
}
|
||||
else if (isMNEMONIC_CNTRL(c)) {
|
||||
Perl_sv_catpvf(aTHX_ sv, "%s", cntrl_to_mnemonic((U8) c));
|
||||
sv_catpvf(sv, "%s", cntrl_to_mnemonic((U8) c));
|
||||
}
|
||||
else {
|
||||
Perl_sv_catpvf(aTHX_ sv, "\\x%02X", (U8) c);
|
||||
sv_catpvf(sv, "\\x%02X", (U8) c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1258,7 +1258,7 @@ S_put_range(pTHX_ SV *sv, UV start, const UV end, const bool allow_literals)
|
||||
format = "\\x%02" UVXf "-\\x%02" UVXf;
|
||||
#endif
|
||||
GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral);
|
||||
Perl_sv_catpvf(aTHX_ sv, format, start, this_end);
|
||||
sv_catpvf(sv, format, start, this_end);
|
||||
GCC_DIAG_RESTORE_STMT;
|
||||
break;
|
||||
}
|
||||
@ -1354,17 +1354,17 @@ S_put_charclass_bitmap_innards_common(pTHX_
|
||||
}
|
||||
|
||||
if (only_utf8 && _invlist_len(only_utf8)) {
|
||||
Perl_sv_catpvf(aTHX_ output, "%s{utf8}%s", PL_colors[1], PL_colors[0]);
|
||||
sv_catpvf(output, "%s{utf8}%s", PL_colors[1], PL_colors[0]);
|
||||
put_charclass_bitmap_innards_invlist(output, only_utf8);
|
||||
}
|
||||
|
||||
if (not_utf8 && _invlist_len(not_utf8)) {
|
||||
Perl_sv_catpvf(aTHX_ output, "%s{not utf8}%s", PL_colors[1], PL_colors[0]);
|
||||
sv_catpvf(output, "%s{not utf8}%s", PL_colors[1], PL_colors[0]);
|
||||
put_charclass_bitmap_innards_invlist(output, not_utf8);
|
||||
}
|
||||
|
||||
if (only_utf8_locale && _invlist_len(only_utf8_locale)) {
|
||||
Perl_sv_catpvf(aTHX_ output, "%s{utf8 locale}%s", PL_colors[1], PL_colors[0]);
|
||||
sv_catpvf(output, "%s{utf8 locale}%s", PL_colors[1], PL_colors[0]);
|
||||
put_charclass_bitmap_innards_invlist(output, only_utf8_locale);
|
||||
|
||||
/* This is the only list in this routine that can legally contain code
|
||||
|
||||
6
sv.c
6
sv.c
@ -13780,7 +13780,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
|
||||
if (isPRINT(*f)) {
|
||||
sv_catpvn_nomg(msg, f, 1);
|
||||
} else {
|
||||
Perl_sv_catpvf(aTHX_ msg, "\\%03o", (U8) *f);
|
||||
sv_catpvf(msg, "\\%03o", (U8) *f);
|
||||
}
|
||||
}
|
||||
sv_catpvs(msg, "\"");
|
||||
@ -16884,14 +16884,14 @@ Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ,
|
||||
const char * const pv = SvPV_nomg_const((SV*)keyname, len);
|
||||
|
||||
*SvPVX(name) = '$';
|
||||
Perl_sv_catpvf(aTHX_ name, "{%s}",
|
||||
sv_catpvf(name, "{%s}",
|
||||
pv_pretty(sv, pv, len, 32, NULL, NULL,
|
||||
PERL_PV_PRETTY_DUMP | PERL_PV_ESCAPE_UNI_DETECT ));
|
||||
SvREFCNT_dec_NN(sv);
|
||||
}
|
||||
else if (subscript_type == FUV_SUBSCRIPT_ARRAY) {
|
||||
*SvPVX(name) = '$';
|
||||
Perl_sv_catpvf(aTHX_ name, "[%" IVdf "]", (IV)aindex);
|
||||
sv_catpvf(name, "[%" IVdf "]", (IV)aindex);
|
||||
}
|
||||
else if (subscript_type == FUV_SUBSCRIPT_WITHIN) {
|
||||
/* We know that name has no magic, so can use 0 instead of SV_GMAGIC */
|
||||
|
||||
28
toke.c
28
toke.c
@ -566,33 +566,33 @@ S_tokereport(pTHX_ I32 rv, const YYSTYPE* lvalp)
|
||||
Perl_sv_catpv(aTHX_ report, name);
|
||||
else if (isGRAPH(rv))
|
||||
{
|
||||
Perl_sv_catpvf(aTHX_ report, "'%c'", (char)rv);
|
||||
sv_catpvf(report, "'%c'", (char)rv);
|
||||
if ((char)rv == 'p')
|
||||
sv_catpvs(report, " (pending identifier)");
|
||||
}
|
||||
else if (!rv)
|
||||
sv_catpvs(report, "EOF");
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ report, "?? %" IVdf, (IV)rv);
|
||||
sv_catpvf(report, "?? %" IVdf, (IV)rv);
|
||||
switch (type) {
|
||||
case TOKENTYPE_NONE:
|
||||
break;
|
||||
case TOKENTYPE_IVAL:
|
||||
Perl_sv_catpvf(aTHX_ report, "(ival=%" IVdf ")", (IV)lvalp->ival);
|
||||
sv_catpvf(report, "(ival=%" IVdf ")", (IV)lvalp->ival);
|
||||
break;
|
||||
case TOKENTYPE_OPNUM:
|
||||
Perl_sv_catpvf(aTHX_ report, "(ival=op_%s)",
|
||||
sv_catpvf(report, "(ival=op_%s)",
|
||||
PL_op_name[lvalp->ival]);
|
||||
break;
|
||||
case TOKENTYPE_PVAL:
|
||||
Perl_sv_catpvf(aTHX_ report, "(pval=%p)", lvalp->pval);
|
||||
sv_catpvf(report, "(pval=%p)", lvalp->pval);
|
||||
break;
|
||||
case TOKENTYPE_OPVAL:
|
||||
if (lvalp->opval) {
|
||||
Perl_sv_catpvf(aTHX_ report, "(opval=op_%s)",
|
||||
sv_catpvf(report, "(opval=op_%s)",
|
||||
PL_op_name[lvalp->opval->op_type]);
|
||||
if (lvalp->opval->op_type == OP_CONST) {
|
||||
Perl_sv_catpvf(aTHX_ report, " %s",
|
||||
sv_catpvf(report, " %s",
|
||||
SvPEEK(cSVOPx_sv(lvalp->opval)));
|
||||
}
|
||||
|
||||
@ -9217,7 +9217,7 @@ yyl_try(pTHX_ char *s)
|
||||
{
|
||||
/* strchr is ok, because -F pattern can't contain
|
||||
* embedded NULs */
|
||||
Perl_sv_catpvf(aTHX_ PL_linestr, "our @F=split(%s);", PL_splitstr);
|
||||
sv_catpvf(PL_linestr, "our @F=split(%s);", PL_splitstr);
|
||||
}
|
||||
else {
|
||||
/* "q\0${splitstr}\0" is legal perl. Yes, even NUL
|
||||
@ -12963,29 +12963,29 @@ Perl_yyerror_pvn(pTHX_ const char *const s, STRLEN len, U32 flags)
|
||||
else {
|
||||
sv_catpvs(where_sv, "next char ");
|
||||
if (yychar < 32)
|
||||
Perl_sv_catpvf(aTHX_ where_sv, "^%c", toCTRL(yychar));
|
||||
sv_catpvf(where_sv, "^%c", toCTRL(yychar));
|
||||
else if (isPRINT_LC(yychar)) {
|
||||
const char string = yychar;
|
||||
sv_catpvn(where_sv, &string, 1);
|
||||
}
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ where_sv, "\\%03o", yychar & 255);
|
||||
sv_catpvf(where_sv, "\\%03o", yychar & 255);
|
||||
}
|
||||
msg = newSVpvn_flags(s, len, (flags & SVf_UTF8) | SVs_TEMP);
|
||||
Perl_sv_catpvf(aTHX_ msg, " at %s line %" LINE_Tf ", ",
|
||||
sv_catpvf(msg, " at %s line %" LINE_Tf ", ",
|
||||
OutCopFILE(PL_curcop),
|
||||
(PL_parser->preambling == NOLINE
|
||||
? CopLINE(PL_curcop)
|
||||
: PL_parser->preambling));
|
||||
if (context)
|
||||
Perl_sv_catpvf(aTHX_ msg, "near \"%" UTF8f "\"\n",
|
||||
sv_catpvf(msg, "near \"%" UTF8f "\"\n",
|
||||
UTF8fARG(UTF, contlen, context));
|
||||
else
|
||||
Perl_sv_catpvf(aTHX_ msg, "%" SVf "\n", SVfARG(where_sv));
|
||||
sv_catpvf(msg, "%" SVf "\n", SVfARG(where_sv));
|
||||
if ( PL_multi_start < PL_multi_end
|
||||
&& (U32)(CopLINE(PL_curcop) - PL_multi_end) <= 1)
|
||||
{
|
||||
Perl_sv_catpvf(aTHX_ msg,
|
||||
sv_catpvf(msg,
|
||||
" (Might be a runaway multi-line %c%c string starting on"
|
||||
" line %" LINE_Tf ")\n",
|
||||
(int)PL_multi_open,(int)PL_multi_close,(line_t)PL_multi_start);
|
||||
|
||||
2
utf8.c
2
utf8.c
@ -4843,7 +4843,7 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim,
|
||||
}
|
||||
}
|
||||
if (!ok)
|
||||
Perl_sv_catpvf(aTHX_ dsv, "\\x{%" UVxf "}", u);
|
||||
sv_catpvf(dsv, "\\x{%" UVxf "}", u);
|
||||
}
|
||||
if (truncated)
|
||||
sv_catpvs(dsv, "...");
|
||||
|
||||
22
util.c
22
util.c
@ -1637,7 +1637,7 @@ Perl_mess_sv(pTHX_ SV *basemsg, bool consume)
|
||||
cop = PL_curcop;
|
||||
|
||||
if (CopLINE(cop))
|
||||
Perl_sv_catpvf(aTHX_ sv, " at %s line %" LINE_Tf,
|
||||
sv_catpvf(sv, " at %s line %" LINE_Tf,
|
||||
OutCopFILE(cop), CopLINE(cop));
|
||||
}
|
||||
|
||||
@ -1648,7 +1648,7 @@ Perl_mess_sv(pTHX_ SV *basemsg, bool consume)
|
||||
STRLEN l;
|
||||
const bool line_mode = (RsSIMPLE(PL_rs) &&
|
||||
*SvPV_const(PL_rs,l) == '\n' && l == 1);
|
||||
Perl_sv_catpvf(aTHX_ sv, ", <%" SVf "> %s %" IVdf,
|
||||
sv_catpvf(sv, ", <%" SVf "> %s %" IVdf,
|
||||
SVfARG(PL_last_in_gv == PL_argvgv
|
||||
? &PL_sv_no
|
||||
: newSVhek_mortal(GvNAME_HEK(PL_last_in_gv))),
|
||||
@ -5673,10 +5673,10 @@ S_xs_version_bootcheck(pTHX_ SSize_t items, SSize_t ax, const char *xs_p,
|
||||
string = vstringify(pmsv);
|
||||
|
||||
if (vn) {
|
||||
Perl_sv_catpvf(aTHX_ xpt, "$%" SVf "::%s %" SVf, SVfARG(module), vn,
|
||||
sv_catpvf(xpt, "$%" SVf "::%s %" SVf, SVfARG(module), vn,
|
||||
SVfARG(string));
|
||||
} else {
|
||||
Perl_sv_catpvf(aTHX_ xpt, "bootstrap parameter %" SVf, SVfARG(string));
|
||||
sv_catpvf(xpt, "bootstrap parameter %" SVf, SVfARG(string));
|
||||
}
|
||||
SvREFCNT_dec(string);
|
||||
|
||||
@ -6587,31 +6587,31 @@ Perl_get_c_backtrace_dump(pTHX_ int depth, int skip)
|
||||
UV i;
|
||||
for (i = 0, frame = bt->frame_info;
|
||||
i < bt->header.frame_count; i++, frame++) {
|
||||
Perl_sv_catpvf(aTHX_ dsv, "%d", (int)i);
|
||||
Perl_sv_catpvf(aTHX_ dsv, "\t%p", frame->addr ? frame->addr : "-");
|
||||
sv_catpvf(dsv, "%d", (int)i);
|
||||
sv_catpvf(dsv, "\t%p", frame->addr ? frame->addr : "-");
|
||||
/* Symbol (function) names might disappear without debug info.
|
||||
*
|
||||
* The source code location might disappear in case of the
|
||||
* optimizer inlining or otherwise rearranging the code. */
|
||||
if (frame->symbol_addr) {
|
||||
Perl_sv_catpvf(aTHX_ dsv, ":%04x",
|
||||
sv_catpvf(dsv, ":%04x",
|
||||
(int)
|
||||
((char*)frame->addr - (char*)frame->symbol_addr));
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ dsv, "\t%s",
|
||||
sv_catpvf(dsv, "\t%s",
|
||||
frame->symbol_name_size &&
|
||||
frame->symbol_name_offset ?
|
||||
(char*)bt + frame->symbol_name_offset : "-");
|
||||
if (frame->source_name_size &&
|
||||
frame->source_name_offset &&
|
||||
frame->source_line_number) {
|
||||
Perl_sv_catpvf(aTHX_ dsv, "\t%s:%" UVuf,
|
||||
sv_catpvf(dsv, "\t%s:%" UVuf,
|
||||
(char*)bt + frame->source_name_offset,
|
||||
(UV)frame->source_line_number);
|
||||
} else {
|
||||
Perl_sv_catpvf(aTHX_ dsv, "\t-");
|
||||
sv_catpvf(dsv, "\t-");
|
||||
}
|
||||
Perl_sv_catpvf(aTHX_ dsv, "\t%s",
|
||||
sv_catpvf(dsv, "\t%s",
|
||||
frame->object_name_size &&
|
||||
frame->object_name_offset ?
|
||||
(char*)bt + frame->object_name_offset : "-");
|
||||
|
||||
4
vutil.c
4
vutil.c
@ -1013,7 +1013,7 @@ Perl_vnumify(pTHX_ SV *vs)
|
||||
{
|
||||
SV * tsv = *av_fetch(av, i, 0);
|
||||
digit = SvIV(tsv);
|
||||
Perl_sv_catpvf(aTHX_ sv, "%03d", (int)digit);
|
||||
sv_catpvf(sv, "%03d", (int)digit);
|
||||
}
|
||||
|
||||
if ( len == 0 ) {
|
||||
@ -1071,7 +1071,7 @@ Perl_vnormal(pTHX_ SV *vs)
|
||||
for ( i = 1 ; i <= len ; i++ ) {
|
||||
SV * tsv = *av_fetch(av, i, 0);
|
||||
digit = SvIV(tsv);
|
||||
Perl_sv_catpvf(aTHX_ sv, ".%" IVdf, (IV)digit);
|
||||
sv_catpvf(sv, ".%" IVdf, (IV)digit);
|
||||
}
|
||||
|
||||
if ( len <= 2 ) { /* short version, must be at least three */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user