These Module::Build tests depended on STDIN. Unfortunately, cron
[p5sagit/p5-mst-13.2.git] / utf8.c
diff --git a/utf8.c b/utf8.c
index f3b7a3b..d0cbb4e 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -283,9 +283,10 @@ Perl_is_utf8_string(pTHX_ const U8 *s, STRLEN len)
             c = UTF8SKIP(x);
             if (IS_UTF8_CHAR_FAST(c)) {
                 if (!IS_UTF8_CHAR(x, c))
-                    goto out;
-            } else if (!is_utf8_char_slow(x, c))
-                goto out;
+                    c = 0;
+            }
+            else
+               c = is_utf8_char_slow(x, c);
 #else
             c = is_utf8_char(x);
 #endif /* #ifdef IS_UTF8_CHAR */
@@ -749,6 +750,8 @@ Unlike C<bytes_to_utf8>, this over-writes the original string, and
 updates len to contain the new length.
 Returns zero on failure, setting C<len> to -1.
 
+If you need a copy of the string, see C<bytes_from_utf8>.
+
 =cut
 */
 
@@ -1614,7 +1617,7 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits
     if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
         if (SvPOK(retval))
            Perl_croak(aTHX_ "Can't find Unicode property definition \"%"SVf"\"",
-                      retval);
+                      (void*)retval);
        Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref");
     }
     return retval;
@@ -2026,7 +2029,7 @@ S_swash_get(pTHX_ SV* swash, UV start, UV span)
                }
 
                if (opc == '+' && otherval)
-                   /*EMPTY*/;   /* replace with otherval */
+                   NOOP;   /* replace with otherval */
                else if (opc == '!' && !otherval)
                    otherval = 1;
                else if (opc == '-' && otherval)