This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Moving variables to their innermost scope.
[perl5.git] / doop.c
diff --git a/doop.c b/doop.c
index e4b2cd8..b5c1003 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -1065,16 +1065,16 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
        dc = SvPVX(sv);         /* sv_usepvn() calls Renew() */
     }
     if (left_utf || right_utf) {
-       UV duc, luc, ruc;
        char *dcorig = dc;
        char *dcsave = NULL;
        STRLEN lulen = leftlen;
        STRLEN rulen = rightlen;
-       STRLEN ulen;
 
        switch (optype) {
        case OP_BIT_AND:
            while (lulen && rulen) {
+                UV duc, luc, ruc;
+                STRLEN ulen;
                luc = utf8n_to_uvchr((U8*)lc, lulen, &ulen, UTF8_ALLOW_ANYUV);
                lc += ulen;
                lulen -= ulen;
@@ -1097,6 +1097,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
            break;
        case OP_BIT_XOR:
            while (lulen && rulen) {
+                UV duc, luc, ruc;
+                STRLEN ulen;
                luc = utf8n_to_uvchr((U8*)lc, lulen, &ulen, UTF8_ALLOW_ANYUV);
                lc += ulen;
                lulen -= ulen;
@@ -1114,6 +1116,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
            goto mop_up_utf;
        case OP_BIT_OR:
            while (lulen && rulen) {
+                UV duc, luc, ruc;
+                STRLEN ulen;
                luc = utf8n_to_uvchr((U8*)lc, lulen, &ulen, UTF8_ALLOW_ANYUV);
                lc += ulen;
                lulen -= ulen;