From 1932805f63d6181a90fe36fabbdc3755a78b072f Mon Sep 17 00:00:00 2001 From: TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com> Date: Tue, 4 Oct 2022 23:58:33 +0900 Subject: 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. --- toke.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toke.c') 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) -- cgit v1.2.1