diff options
author | TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com> | 2022-10-04 23:58:33 +0900 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-10-13 10:27:43 -0600 |
commit | 1932805f63d6181a90fe36fabbdc3755a78b072f (patch) | |
tree | df191c9e36b88569fa1ad23a2f1444d4755c9a09 /util.c | |
parent | be5c21321156733f58ac73b090ea937da104f7fa (diff) | |
download | perl-1932805f63d6181a90fe36fabbdc3755a78b072f.tar.gz |
Use `LINE_Tf` thoroughly for formatting the value of CopLINE()
The value of CopLINE() used to be formatted with various way; sometimes
with `%ld` and `(long)` cast, sometimes `IVdf` and `(IV)` cast, or `%d`
and so on.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1742,8 +1742,8 @@ Perl_mess_sv(pTHX_ SV *basemsg, bool consume) cop = PL_curcop; if (CopLINE(cop)) - Perl_sv_catpvf(aTHX_ sv, " at %s line %" IVdf, - OutCopFILE(cop), (IV)CopLINE(cop)); + Perl_sv_catpvf(aTHX_ sv, " at %s line %" LINE_Tf, + OutCopFILE(cop), CopLINE(cop)); } /* Seems that GvIO() can be untrustworthy during global destruction. */ @@ -5233,7 +5233,7 @@ S_mem_log_common(enum mem_log_type mlt, const UV n, #ifdef USE_C_BACKTRACE if(strchr(pmlenv,'c') && (mlt == MLT_NEW_SV)) { len = my_snprintf(buf, sizeof(buf), - " caller %s at %s line %d\n", + " caller %s at %s line %" LINE_Tf "\n", /* CopSTASHPV can crash early on startup; use CopFILE to check */ CopFILE(PL_curcop) ? CopSTASHPV(PL_curcop) : "<unknown>", CopFILE(PL_curcop), CopLINE(PL_curcop)); |