From 1932805f63d6181a90fe36fabbdc3755a78b072f Mon Sep 17 00:00:00 2001 From: TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com> Date: Tue, 4 Oct 2022 23:58:33 +0900 Subject: 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. --- perlio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perlio.c') 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); -- cgit v1.2.1