summaryrefslogtreecommitdiff
path: root/perlio.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 /perlio.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 'perlio.c')
-rw-r--r--perlio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/perlio.c b/perlio.c
index e3223d6d42..f787804dcf 100644
--- a/perlio.c
+++ b/perlio.c
@@ -362,7 +362,7 @@ PerlIO_debug(const char *fmt, ...)
const char * const s = CopFILE(PL_curcop);
/* Use fixed buffer as sv_catpvf etc. needs SVs */
char buffer[1024];
- const STRLEN len1 = my_snprintf(buffer, sizeof(buffer), "%.40s:%" IVdf " ", s ? s : "(none)", (IV) CopLINE(PL_curcop));
+ const STRLEN len1 = my_snprintf(buffer, sizeof(buffer), "%.40s:%" LINE_Tf " ", s ? s : "(none)", CopLINE(PL_curcop));
# ifdef USE_QUADMATH
# ifdef HAS_VSNPRINTF
/* my_vsnprintf() isn't available with quadmath, but the native vsnprintf()
@@ -380,8 +380,8 @@ PerlIO_debug(const char *fmt, ...)
#else
const char *s = CopFILE(PL_curcop);
STRLEN len;
- SV * const sv = Perl_newSVpvf(aTHX_ "%s:%" IVdf " ", s ? s : "(none)",
- (IV) CopLINE(PL_curcop));
+ SV * const sv = Perl_newSVpvf(aTHX_ "%s:%" LINE_Tf " ",
+ s ? s : "(none)", CopLINE(PL_curcop));
Perl_sv_vcatpvf(aTHX_ sv, fmt, &ap);
s = SvPV_const(sv, len);