This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_formline: split FF_LINEGLOB into two blocks
authorDavid Mitchell <davem@iabyn.com>
Sat, 28 May 2011 14:17:37 +0000 (15:17 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 29 May 2011 19:21:53 +0000 (20:21 +0100)
The second block is shortly going to be used by others too

pp_ctl.c

index 3304eac..271ab05 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -892,7 +892,6 @@ PP(pp_formline)
                const bool oneline = fpc[-1] == FF_LINESNGL;
                const char *s = item = SvPV_const(sv, len);
                const char *const send = s + len;
-               U8 *tmp = NULL;
 
                item_is_utf8 = DO_UTF8(sv);
                itemsize = len;
@@ -917,6 +916,10 @@ PP(pp_formline)
                        }
                    }
                }
+           }
+
+           {
+               U8 *tmp = NULL;
                if (targ_is_utf8 && !item_is_utf8) {
                    source = tmp = bytes_to_utf8(source, &to_copy);
                    SvCUR_set(PL_formtarget,