summaryrefslogtreecommitdiff
path: root/deb.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 /deb.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 'deb.c')
-rw-r--r--deb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/deb.c b/deb.c
index 182d6d9976..64ff5874cb 100644
--- a/deb.c
+++ b/deb.c
@@ -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;