Skip to content

Commit ba04a90

Browse files
Leontmauke
authored andcommitted
Stop calling Perl_sv_catpvf manually
Call sv_catpvf instead
1 parent 410115a commit ba04a90

14 files changed

+139
-139
lines changed

class.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ XS(injected_constructor)
230230
SAVEFREESV(paramnames);
231231

232232
while((he = hv_iternext(params)))
233-
Perl_sv_catpvf(aTHX_ paramnames, ", %" SVf, SVfARG(HeSVKEY_force(he)));
233+
sv_catpvf(paramnames, ", %" SVf, SVfARG(HeSVKEY_force(he)));
234234

235235
croak("Unrecognised parameters for %" HvNAMEf_QUOTEDPREFIX " constructor: %" SVf,
236236
HvNAMEfARG(stash), SVfARG(paramnames));

dquote.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Perl_form_alien_digit_msg(pTHX_
144144
if (isPRINT(*first_bad)) {
145145
sv_catpvs(message_sv, "'");
146146
}
147-
Perl_sv_catpvf(aTHX_ message_sv, " terminates \\%c early. Resolved as "
147+
sv_catpvf(message_sv, " terminates \\%c early. Resolved as "
148148
"\"\\%c", symbol, symbol);
149149
if (braced) {
150150
sv_catpvs(message_sv, "{");
@@ -218,13 +218,13 @@ Perl_form_cp_too_large_msg(pTHX_
218218

219219
Perl_sv_setpvf(aTHX_ message_sv, "Use of code point %s", prefix);
220220
if (string) {
221-
Perl_sv_catpvf(aTHX_ message_sv, "%.*s", (int) len, string);
221+
sv_catpvf(message_sv, "%.*s", (int) len, string);
222222
}
223223
else {
224-
Perl_sv_catpvf(aTHX_ message_sv, format, cp);
224+
sv_catpvf(message_sv, format, cp);
225225
}
226-
Perl_sv_catpvf(aTHX_ message_sv, " is not allowed; the permissible max is %s", prefix);
227-
Perl_sv_catpvf(aTHX_ message_sv, format, MAX_LEGAL_CP);
226+
sv_catpvf(message_sv, " is not allowed; the permissible max is %s", prefix);
227+
sv_catpvf(message_sv, format, MAX_LEGAL_CP);
228228

229229
return SvPVX_const(message_sv);
230230
}

dump.c

+25-25
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
302302
if (restart) {
303303
/* this only happens with PERL_PV_ESCAPE_TRUNC_MIDDLE */
304304
if (dsv)
305-
Perl_sv_catpvf( aTHX_ dsv,"%s...%s", qe, qs);
305+
sv_catpvf( dsv,"%s...%s", qe, qs);
306306
wrote += extra_len;
307307
pv = restart;
308308
max = tail;
@@ -323,7 +323,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
323323
how to keep it clear that it's unlike the s of catpvs, which is
324324
really an array of octets, not a string. */
325325
if (dsv)
326-
Perl_sv_catpvf( aTHX_ dsv, "%c", c);
326+
sv_catpvf( dsv, "%c", c);
327327
wrote++;
328328
}
329329
if ( flags & PERL_PV_ESCAPE_FIRSTCHAR )
@@ -382,7 +382,7 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
382382
orig_cur= SvCUR(dsv);
383383

384384
if ( quotes )
385-
Perl_sv_catpvf(aTHX_ dsv, "%c", quotes[0]);
385+
sv_catpvf(dsv, "%c", quotes[0]);
386386

387387
if ( start_color != NULL )
388388
sv_catpv(dsv, start_color);
@@ -403,7 +403,7 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
403403
sv_catpv(dsv, end_color);
404404

405405
if ( quotes )
406-
Perl_sv_catpvf(aTHX_ dsv, "%c", quotes[1]);
406+
sv_catpvf(dsv, "%c", quotes[1]);
407407

408408
if ( (flags & PERL_PV_PRETTY_ELLIPSES) && ( escaped < count ) )
409409
sv_catpvs(dsv, "...");
@@ -540,14 +540,14 @@ Perl_sv_peek(pTHX_ SV *sv)
540540
}
541541
}
542542
if (is_tmp || SvREFCNT(sv) > 1 || SvPADTMP(sv)) {
543-
Perl_sv_catpvf(aTHX_ t, "<");
543+
sv_catpvf(t, "<");
544544
if (SvREFCNT(sv) > 1)
545-
Perl_sv_catpvf(aTHX_ t, "%" UVuf, (UV)SvREFCNT(sv));
545+
sv_catpvf(t, "%" UVuf, (UV)SvREFCNT(sv));
546546
if (SvPADTMP(sv))
547-
Perl_sv_catpvf(aTHX_ t, "%s", "P");
547+
sv_catpvf(t, "%s", "P");
548548
if (is_tmp)
549-
Perl_sv_catpvf(aTHX_ t, "%s", SvTEMP(t) ? "T" : "t");
550-
Perl_sv_catpvf(aTHX_ t, ">");
549+
sv_catpvf(t, "%s", SvTEMP(t) ? "T" : "t");
550+
sv_catpvf(t, ">");
551551
}
552552
}
553553

@@ -566,7 +566,7 @@ Perl_sv_peek(pTHX_ SV *sv)
566566
if (type == SVt_PVCV) {
567567
SV * const tmp = newSVpvs_flags("", SVs_TEMP);
568568
GV* gvcv = CvGV(sv);
569-
Perl_sv_catpvf(aTHX_ t, "CV(%s)", gvcv
569+
sv_catpvf(t, "CV(%s)", gvcv
570570
? generic_pv_escape( tmp, GvNAME(gvcv), GvNAMELEN(gvcv), GvNAMEUTF8(gvcv))
571571
: "");
572572
goto finish;
@@ -589,11 +589,11 @@ Perl_sv_peek(pTHX_ SV *sv)
589589
if (SvOOK(sv)) {
590590
STRLEN delta;
591591
SvOOK_offset(sv, delta);
592-
Perl_sv_catpvf(aTHX_ t, "[%s]", pv_display(tmp, SvPVX_const(sv)-delta, delta, 0, 127));
592+
sv_catpvf(t, "[%s]", pv_display(tmp, SvPVX_const(sv)-delta, delta, 0, 127));
593593
}
594-
Perl_sv_catpvf(aTHX_ t, "%s)", pv_display(tmp, SvPVX_const(sv), SvCUR(sv), SvLEN(sv), 127));
594+
sv_catpvf(t, "%s)", pv_display(tmp, SvPVX_const(sv), SvCUR(sv), SvLEN(sv), 127));
595595
if (SvUTF8(sv))
596-
Perl_sv_catpvf(aTHX_ t, " [UTF8 \"%s\"]",
596+
sv_catpvf(t, " [UTF8 \"%s\"]",
597597
sv_uni_display(tmp, sv, 6 * SvCUR(sv),
598598
UNI_DISPLAY_QQ));
599599
SvREFCNT_dec_NN(tmp);
@@ -602,14 +602,14 @@ Perl_sv_peek(pTHX_ SV *sv)
602602
else if (SvNOKp(sv)) {
603603
DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
604604
STORE_LC_NUMERIC_SET_STANDARD();
605-
Perl_sv_catpvf(aTHX_ t, "(%" NVgf ")",SvNVX(sv));
605+
sv_catpvf(t, "(%" NVgf ")",SvNVX(sv));
606606
RESTORE_LC_NUMERIC();
607607
}
608608
else if (SvIOKp(sv)) {
609609
if (SvIsUV(sv))
610-
Perl_sv_catpvf(aTHX_ t, "(%" UVuf ")", (UV)SvUVX(sv));
610+
sv_catpvf(t, "(%" UVuf ")", (UV)SvUVX(sv));
611611
else
612-
Perl_sv_catpvf(aTHX_ t, "(%" IVdf ")", (IV)SvIVX(sv));
612+
sv_catpvf(t, "(%" IVdf ")", (IV)SvIVX(sv));
613613
}
614614
else
615615
sv_catpvs(t, "()");
@@ -952,7 +952,7 @@ S_gv_display(pTHX_ GV *gv)
952952
if (isGV_with_GP(gv))
953953
gv_fullname3(raw, gv, NULL);
954954
else {
955-
Perl_sv_catpvf(aTHX_ raw, "cv ref: %s",
955+
sv_catpvf(raw, "cv ref: %s",
956956
SvPV_nolen_const(cv_name(CV_FROM_REF((SV*)gv), name, 0)));
957957
}
958958
rawpv = SvPV_const(raw, len);
@@ -1312,7 +1312,7 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const OP *o)
13121312
sv_catpvs(tmpsv, "=");
13131313
}
13141314
if (enum_label == -1)
1315-
Perl_sv_catpvf(aTHX_ tmpsv, "0x%" UVxf, (UV)val);
1315+
sv_catpvf(tmpsv, "0x%" UVxf, (UV)val);
13161316
else
13171317
sv_catpv(tmpsv, &PL_op_private_labels[enum_label]);
13181318

@@ -1331,7 +1331,7 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const OP *o)
13311331
}
13321332
if (oppriv) {
13331333
sv_catpvs(tmpsv, ",");
1334-
Perl_sv_catpvf(aTHX_ tmpsv, "0x%" UVxf, (UV)oppriv);
1334+
sv_catpvf(tmpsv, "0x%" UVxf, (UV)oppriv);
13351335
}
13361336
}
13371337
if (tmpsv && SvCUR(tmpsv)) {
@@ -2430,7 +2430,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
24302430
while (hekp < endp) {
24312431
if (*hekp) {
24322432
SV *tmp = newSVpvs_flags("", SVs_TEMP);
2433-
Perl_sv_catpvf(aTHX_ names, ", \"%s\"",
2433+
sv_catpvf(names, ", \"%s\"",
24342434
generic_pv_escape(tmp, HEK_KEY(*hekp), HEK_LEN(*hekp), HEK_UTF8(*hekp)));
24352435
} else {
24362436
/* This should never happen. */
@@ -3071,14 +3071,14 @@ S_append_padvar(pTHX_ PADOFFSET off, CV *cv, SV *out, int n,
30713071
if (namepad && (sv = padnamelist_fetch(namepad, off + i)))
30723072
{
30733073
STRLEN cur = SvCUR(out);
3074-
Perl_sv_catpvf(aTHX_ out, "[%" UTF8f,
3074+
sv_catpvf(out, "[%" UTF8f,
30753075
UTF8fARG(1, PadnameLEN(sv) - 1,
30763076
PadnamePV(sv) + 1));
30773077
if (is_scalar)
30783078
SvPVX(out)[cur] = '$';
30793079
}
30803080
else
3081-
Perl_sv_catpvf(aTHX_ out, "[%" UVuf "]", (UV)(off+i));
3081+
sv_catpvf(out, "[%" UVuf "]", (UV)(off+i));
30823082
if (i < n - 1)
30833083
sv_catpvs_nomg(out, ",");
30843084
}
@@ -3097,7 +3097,7 @@ S_append_gv_name(pTHX_ GV *gv, SV *out)
30973097
}
30983098
sv = newSV_type(SVt_NULL);
30993099
gv_fullname4(sv, gv, NULL, FALSE);
3100-
Perl_sv_catpvf(aTHX_ out, "$%" SVf, SVfARG(sv));
3100+
sv_catpvf(out, "$%" SVf, SVfARG(sv));
31013101
SvREFCNT_dec_NN(sv);
31023102
}
31033103

@@ -3218,7 +3218,7 @@ Perl_multideref_stringify(pTHX_ const OP *o, CV *cv)
32183218
}
32193219
}
32203220
else
3221-
Perl_sv_catpvf(aTHX_ out, "%" IVdf, (++items)->iv);
3221+
sv_catpvf(out, "%" IVdf, (++items)->iv);
32223222
break;
32233223
case MDEREF_INDEX_padsv:
32243224
S_append_padvar(aTHX_ (++items)->pad_offset, cv, out, 1, 0, 1);
@@ -3285,7 +3285,7 @@ Perl_multiconcat_stringify(pTHX_ const OP *o)
32853285

32863286
lens = aux + PERL_MULTICONCAT_IX_LENGTHS;
32873287
while (nargs-- >= 0) {
3288-
Perl_sv_catpvf(aTHX_ out, ",%" IVdf, (IV)lens->ssize);
3288+
sv_catpvf(out, ",%" IVdf, (IV)lens->ssize);
32893289
lens++;
32903290
}
32913291
return out;

locale.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -4035,14 +4035,14 @@ S_new_ctype(pTHX_ const char *newctype, bool force)
40354035
}
40364036

40374037
if (PL_in_utf8_CTYPE_locale) {
4038-
Perl_sv_catpvf(aTHX_ PL_warn_locale,
4038+
sv_catpvf(PL_warn_locale,
40394039
"Locale '%s' contains (at least) the following characters"
40404040
" which have\nunexpected meanings: %s\nThe Perl program"
40414041
" will use the expected meanings",
40424042
newctype, bad_chars_list);
40434043
}
40444044
else {
4045-
Perl_sv_catpvf(aTHX_ PL_warn_locale,
4045+
sv_catpvf(PL_warn_locale,
40464046
"\nThe following characters (and maybe"
40474047
" others) may not have the same meaning as"
40484048
" the Perl program expects: %s\n",
@@ -4052,12 +4052,12 @@ S_new_ctype(pTHX_ const char *newctype, bool force)
40524052

40534053
# if defined(HAS_SOME_LANGINFO) || defined(WIN32)
40544054

4055-
Perl_sv_catpvf(aTHX_ PL_warn_locale, "; codeset=%s",
4055+
sv_catpvf(PL_warn_locale, "; codeset=%s",
40564056
langinfo_c(CODESET, LC_CTYPE, newctype, NULL));
40574057

40584058
# endif
40594059

4060-
Perl_sv_catpvf(aTHX_ PL_warn_locale, "\n");
4060+
sv_catpvf(PL_warn_locale, "\n");
40614061

40624062
/* If we are actually in the scope of the locale or are debugging,
40634063
* output the message now. If not in that scope, we save the

mg.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
12611261
Newx(gary, num_groups, Groups_t);
12621262
num_groups = getgroups(num_groups, gary);
12631263
for (i = 0; i < num_groups; i++)
1264-
Perl_sv_catpvf(aTHX_ sv, " %" IVdf, (IV)gary[i]);
1264+
sv_catpvf(sv, " %" IVdf, (IV)gary[i]);
12651265
Safefree(gary);
12661266
}
12671267
}

op.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -6588,7 +6588,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
65886588
sv_catpvn(inverted_tstr, (char *) temp, temp_end_pos - temp);
65896589

65906590
if (start != end) {
6591-
Perl_sv_catpvf(aTHX_ inverted_tstr, "%c", RANGE_INDICATOR);
6591+
sv_catpvf(inverted_tstr, "%c", RANGE_INDICATOR);
65926592
temp_end_pos = uv_to_utf8(temp, end);
65936593
sv_catpvn(inverted_tstr, (char *) temp, temp_end_pos - temp);
65946594
}
@@ -10383,16 +10383,16 @@ Perl_cv_ckproto_len_flags(pTHX_ const CV *cv, const GV *gv, const char *p,
1038310383
}
1038410384
sv_setpvs(msg, "Prototype mismatch:");
1038510385
if (name)
10386-
Perl_sv_catpvf(aTHX_ msg, " sub %" SVf, SVfARG(name));
10386+
sv_catpvf(msg, " sub %" SVf, SVfARG(name));
1038710387
if (cvp)
10388-
Perl_sv_catpvf(aTHX_ msg, " (%" UTF8f ")",
10388+
sv_catpvf(msg, " (%" UTF8f ")",
1038910389
UTF8fARG(SvUTF8(cv),clen,cvp)
1039010390
);
1039110391
else
1039210392
sv_catpvs(msg, ": none");
1039310393
sv_catpvs(msg, " vs ");
1039410394
if (p)
10395-
Perl_sv_catpvf(aTHX_ msg, "(%" UTF8f ")", UTF8fARG(flags & SVf_UTF8,len,p));
10395+
sv_catpvf(msg, "(%" UTF8f ")", UTF8fARG(flags & SVf_UTF8,len,p));
1039610396
else
1039710397
sv_catpvs(msg, "none");
1039810398
Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%" SVf, SVfARG(msg));

perl.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,7 @@ Perl_moreswitches(pTHX_ const char *s)
37863786
sv_catpvn(sv, start, s-start);
37873787
/* Don't use NUL as q// delimiter here, this string goes in the
37883788
* environment. */
3789-
Perl_sv_catpvf(aTHX_ sv, " split(/,/,q{%s});", ++s);
3789+
sv_catpvf(sv, " split(/,/,q{%s});", ++s);
37903790
}
37913791
s = end;
37923792
my_setenv("PERL5DB", SvPV_nolen_const(sv));
@@ -5190,7 +5190,7 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
51905190
if (addoldvers) {
51915191
for (incver = incverlist; *incver; incver++) {
51925192
/* .../xxx if -d .../xxx */
5193-
Perl_sv_catpvf(aTHX_ subdir, "/%s", *incver);
5193+
sv_catpvf(subdir, "/%s", *incver);
51945194
subdir = S_incpush_if_exists(aTHX_ av, subdir, libdir);
51955195
}
51965196
}
@@ -5328,7 +5328,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
53285328
if (paramList == PL_beginav)
53295329
sv_catpvs(atsv, "BEGIN failed--compilation aborted");
53305330
else
5331-
Perl_sv_catpvf(aTHX_ atsv,
5331+
sv_catpvf(atsv,
53325332
"%s failed--call queue aborted",
53335333
paramList == PL_checkav ? "CHECK"
53345334
: paramList == PL_initav ? "INIT"

0 commit comments

Comments
 (0)