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 /perlio.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 'perlio.c')
-rw-r--r-- | perlio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |