In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a099aed4f4cbb1c9ea2766707caa76d250e3b25a?hp=65c512c3519b68852f64f5e1293cebadee892115>

- Log -----------------------------------------------------------------
commit a099aed4f4cbb1c9ea2766707caa76d250e3b25a
Author: Karl Williamson <[email protected]>
Date:   Mon Mar 5 10:34:05 2012 -0700

    PATCH: [perl #111338] Warnings in utf8 subcategories do nothing in isolation
    
    This was the result of assuming that these would not be on unless
    the main category was also on.
-----------------------------------------------------------------------

Summary of changes:
 doio.c              |    2 +-
 t/lib/warnings/utf8 |    3 ---
 utf8.c              |    2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/doio.c b/doio.c
index 5d54a9b..0da05c1 100644
--- a/doio.c
+++ b/doio.c
@@ -1225,7 +1225,7 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
                tmpbuf = bytes_to_utf8((const U8*) tmps, &len);
                tmps = (char *) tmpbuf;
            }
-           else if (ckWARN_d(WARN_UTF8)) {
+           else if (ckWARN4_d(WARN_UTF8, WARN_SURROGATE, WARN_NON_UNICODE, 
WARN_NONCHAR)) {
                (void) check_utf8_print((const U8*) tmps, len);
            }
        }
diff --git a/t/lib/warnings/utf8 b/t/lib/warnings/utf8
index f6fa8f2..603cfa0 100644
--- a/t/lib/warnings/utf8
+++ b/t/lib/warnings/utf8
@@ -349,7 +349,6 @@ EXPECT
 Unicode surrogate U+D800 is illegal in UTF-8 at - line 6.
 Unicode non-character U+FFFF is illegal for open interchange at - line 7.
 ########
-# TODO
 # NAME C<use warnings "nonchar"> works in isolation
 require "../test.pl";
 use warnings 'nonchar';
@@ -360,7 +359,6 @@ close $fh;
 EXPECT
 Unicode non-character U+FFFF is illegal for open interchange at - line 5.
 ########
-# TODO
 # NAME C<use warnings "surrogate"> works in isolation
 require "../test.pl";
 use warnings 'surrogate';
@@ -371,7 +369,6 @@ close $fh;
 EXPECT
 Unicode surrogate U+D800 is illegal in UTF-8 at - line 5.
 ########
-# TODO
 # NAME C<use warnings "non_unicode"> works in isolation
 require "../test.pl";
 use warnings 'non_unicode';
diff --git a/utf8.c b/utf8.c
index 613f10a..1a69dd3 100644
--- a/utf8.c
+++ b/utf8.c
@@ -137,7 +137,7 @@ Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
 {
     PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS;
 
-    if (ckWARN_d(WARN_UTF8)) {
+    if (ckWARN4_d(WARN_UTF8, WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) {
        if (UNICODE_IS_SURROGATE(uv)) {
            if (flags & UNICODE_WARN_SURROGATE) {
                Perl_ck_warner_d(aTHX_ packWARN(WARN_SURROGATE),

--
Perl5 Master Repository

Reply via email to