Skip to content

Commit ee17861

Browse files
khwilliamsontonycoz
authored andcommitted
Add LINE_Tf format for line_t variables
This is so you can print them without having to know their length.
1 parent f67cdee commit ee17861

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

handy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,7 @@ The typedef to use to declare variables that are to hold line numbers.
25192519
Line numbers are unsigned, 32 bits.
25202520
*/
25212521
typedef U32 line_t;
2522+
#define LINE_Tf U32uf
25222523
#define NOLINE ((line_t) 4294967295UL) /* = FFFFFFFF */
25232524

25242525
/* Helpful alias for version prescan */

locale.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,8 @@ S_setlocale_failure_panic_i(pTHX_
12581258
}
12591259

12601260
RESTORE_ERRNO;
1261-
Perl_croak(aTHX_ "panic: %s: %d:(%d): Can't change locale for %s(%d)"
1261+
Perl_croak(aTHX_ "panic: %s: %" LINE_Tf "d:(%" LINE_Tf
1262+
"): Can't change locale for" " %s(%d)"
12621263
" from '%s' to '%s'; errno=%d\n",
12631264
__FILE__, caller_0_line, caller_1_line, name, cat,
12641265
current, failed, errno);

0 commit comments

Comments
 (0)