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 /deb.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 'deb.c')
-rw-r--r-- | deb.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -87,17 +87,18 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) #ifdef DEBUGGING const char* const file = PL_curcop ? OutCopFILE(PL_curcop) : "<null>"; const char* const display_file = file ? file : "<free>"; - long line = PL_curcop ? (long)CopLINE(PL_curcop) : NOLINE; + line_t line = PL_curcop ? CopLINE(PL_curcop) : NOLINE; if (line == NOLINE) line = 0; PERL_ARGS_ASSERT_VDEB; if (DEBUG_v_TEST) - PerlIO_printf(Perl_debug_log, "(%ld:%s:%ld)\t", + PerlIO_printf(Perl_debug_log, "(%ld:%s:%" LINE_Tf ")\t", (long)PerlProc_getpid(), display_file, line); else - PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", display_file, line); + PerlIO_printf(Perl_debug_log, "(%s:%" LINE_Tf ")\t", + display_file, line); (void) PerlIO_vprintf(Perl_debug_log, pat, *args); #else PERL_UNUSED_CONTEXT; |