[prev in list] [next in list] [prev in thread] [next in thread]
List: perl5-changes
Subject: [perl.git] branch blead, updated. v5.21.10-49-gb59c097
From: Dave Mitchell <davem () iabyn ! com>
Date: 2015-03-31 8:49:15
Message-ID: E1YcrrH-0007iT-27 () camel-001 ! ams6 ! corp ! booking ! com
[Download RAW message or body]
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/b59c097b49284abd930e336dd60287f3925c80f4?hp=0145df7dd5b968b40a7863a706f0ede54ad4249d>
- Log -----------------------------------------------------------------
commit b59c097b49284abd930e336dd60287f3925c80f4
Author: Alex Vandiver <alex@chmrr.net>
Date: Tue Mar 31 03:46:41 2015 -0400
toke.c: UTF-8 aware warning cleanups
-----------------------------------------------------------------------
Summary of changes:
t/lib/warnings/toke | 6 ++++--
toke.c | 13 +++++++------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index 6cbce2e..dab8451 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -1545,10 +1545,12 @@ Comme ca!
########
# toke.c
# Fix 'Use of "..." without parentheses is ambiguous' warning for
-# Unicode function names
+# Unicode function names. If not under PERL_UNICODE, this will generate
+# a "Wide character" warning
use utf8;
use warnings;
sub 𝛃(;$) { return 0; }
my $v = 𝛃 - 5;
EXPECT
-Warning: Use of "𝛃" without parentheses is ambiguous at - line 7.
+OPTION regex
+(Wide character.*\n)?Warning: Use of "𝛃" without parentheses is ambiguous
diff --git a/toke.c b/toke.c
index f974b1c..2a99f0b 100644
--- a/toke.c
+++ b/toke.c
@@ -1846,8 +1846,8 @@ S_check_uni(pTHX)
return;
Perl_ck_warner_d(aTHX_ packWARN(WARN_AMBIGUOUS),
- "Warning: Use of \"%.*s\" without parentheses is ambiguous",
- (int)(s - PL_last_uni), PL_last_uni);
+ "Warning: Use of \"%"UTF8f"\" without parentheses is ambiguous",
+ UTF8fARG(UTF, (int)(s - PL_last_uni), PL_last_uni));
}
/*
@@ -2529,9 +2529,10 @@ S_get_and_check_backslash_N_name(pTHX_ const char* s, const \
char* const e)
/* We deliberately don't try to print the malformed character, which
* might not print very well; it also may be just the first of many
* malformations, so don't print what comes after it */
- yyerror(Perl_form(aTHX_
+ yyerror_pv(Perl_form(aTHX_
"Malformed UTF-8 character immediately after '%.*s'",
- (int) (first_bad_char_loc - (U8 *) backslash_ptr), backslash_ptr));
+ (int) (first_bad_char_loc - (U8 *) backslash_ptr), backslash_ptr),
+ SVf_UTF8);
return NULL;
}
@@ -6055,8 +6056,8 @@ Perl_yylex(pTHX)
while (t < PL_bufend && *t != ']')
t++;
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
- "Multidimensional syntax %.*s not supported",
- (int)((t - PL_bufptr) + 1), PL_bufptr);
+ "Multidimensional syntax %"UTF8f" not supported",
+ UTF8fARG(UTF,(int)((t - PL_bufptr) + 1), \
PL_bufptr)); }
}
}
--
Perl5 Master Repository
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic