[win32] change#398 breaks ENV_IS_CASELESS, fix it
Gurusamy Sarathy [Thu, 8 Jan 1998 20:54:31 +0000 (20:54 +0000)]
p4raw-link: @398 on //depot/perl: 0a0bb7c7269ef911ca3981a2b5365150a9ad4cfe

p4raw-id: //depot/win32/perl@412

hv.c

diff --git a/hv.c b/hv.c
index d973ea8..5a0f9d2 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -442,13 +442,13 @@ hv_delete(HV *hv, char *key, U32 klen, I32 flags)
                }
                return Nullsv;          /* element cannot be deleted */
            }
-        }
 #ifdef ENV_IS_CASELESS
-       else if (mg_find((SV*)hv,'E')) {
-           sv = sv_2mortal(newSVpv(key,klen));
-           key = strupr(SvPVX(sv));
-       }
+           else if (mg_find((SV*)hv,'E')) {
+               sv = sv_2mortal(newSVpv(key,klen));
+               key = strupr(SvPVX(sv));
+           }
 #endif
+        }
     }
     xhv = (XPVHV*)SvANY(hv);
     if (!xhv->xhv_array)
@@ -512,15 +512,15 @@ hv_delete_ent(HV *hv, SV *keysv, I32 flags, U32 hash)
                }               
                return Nullsv;          /* element cannot be deleted */
            }
-       }
 #ifdef ENV_IS_CASELESS
-       else if (mg_find((SV*)hv,'E')) {
-           key = SvPV(keysv, klen);
-           keysv = sv_2mortal(newSVpv(key,klen));
-           (void)strupr(SvPVX(keysv));
-           hash = 0; 
-       }
+           else if (mg_find((SV*)hv,'E')) {
+               key = SvPV(keysv, klen);
+               keysv = sv_2mortal(newSVpv(key,klen));
+               (void)strupr(SvPVX(keysv));
+               hash = 0; 
+           }
 #endif
+       }
     }
     xhv = (XPVHV*)SvANY(hv);
     if (!xhv->xhv_array)