summaryrefslogtreecommitdiff
path: root/toke.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 /toke.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 'toke.c')
-rw-r--r--toke.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 6c39d8b110..f7e9bc4c65 100644
--- a/toke.c
+++ b/toke.c
@@ -7755,7 +7755,7 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct
case KEY___LINE__:
FUN0OP(
newSVOP(OP_CONST, 0,
- Perl_newSVpvf(aTHX_ "%" IVdf, (IV)CopLINE(PL_curcop)))
+ Perl_newSVpvf(aTHX_ "%" LINE_Tf, CopLINE(PL_curcop)))
);
case KEY___PACKAGE__:
@@ -12626,9 +12626,9 @@ Perl_yyerror_pvn(pTHX_ const char *const s, STRLEN len, U32 flags)
Perl_sv_catpvf(aTHX_ where_sv, "\\%03o", yychar & 255);
}
msg = newSVpvn_flags(s, len, (flags & SVf_UTF8) | SVs_TEMP);
- Perl_sv_catpvf(aTHX_ msg, " at %s line %" IVdf ", ",
+ Perl_sv_catpvf(aTHX_ msg, " at %s line %" LINE_Tf ", ",
OutCopFILE(PL_curcop),
- (IV)(PL_parser->preambling == NOLINE
+ (PL_parser->preambling == NOLINE
? CopLINE(PL_curcop)
: PL_parser->preambling));
if (context)