summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorTAKAI Kousuke <62541129+t-a-k@users.noreply.github.com>2022-10-04 23:58:33 +0900
committerKarl Williamson <khw@cpan.org>2022-10-13 10:27:43 -0600
commit1932805f63d6181a90fe36fabbdc3755a78b072f (patch)
treedf191c9e36b88569fa1ad23a2f1444d4755c9a09 /util.c
parentbe5c21321156733f58ac73b090ea937da104f7fa (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c
index 53862290dd..90221496d1 100644
--- a/util.c
+++ b/util.c
@@ -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));