This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: White_space only
authorKarl Williamson <khw@cpan.org>
Thu, 8 Jun 2017 03:17:56 +0000 (21:17 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 8 Jun 2017 17:04:43 +0000 (11:04 -0600)
The previous commit created a block around the lines changed by this
current commit.

utf8.c

diff --git a/utf8.c b/utf8.c
index a439c8e..6e6f1d5 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2005,20 +2005,20 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8)
     Newx(d, (*len) - count + 1, U8);
 
     if (LIKELY(count)) {
-    s = start; start = d;
-    while (s < send) {
-       U8 c = *s++;
-       if (! UTF8_IS_INVARIANT(c)) {
-           /* Then it is two-byte encoded */
-           c = EIGHT_BIT_UTF8_TO_NATIVE(c, *s);
-            s++;
-       }
-       *d++ = c;
-    }
-    *d = '\0';
-    *len = d - start;
+        s = start; start = d;
+        while (s < send) {
+            U8 c = *s++;
+            if (! UTF8_IS_INVARIANT(c)) {
+                /* Then it is two-byte encoded */
+                c = EIGHT_BIT_UTF8_TO_NATIVE(c, *s);
+                s++;
+            }
+            *d++ = c;
+        }
+        *d = '\0';
+        *len = d - start;
 
-    return (U8 *)start;
+        return (U8 *)start;
     }
     else {
         Copy(start, d, *len, U8);