]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
Reverse preeminent logic in su_save_helem()
authorVincent Pit <vince@profvince.com>
Sun, 28 Dec 2008 17:22:34 +0000 (18:22 +0100)
committerVincent Pit <vince@profvince.com>
Sun, 28 Dec 2008 17:22:34 +0000 (18:22 +0100)
Upper.xs

index 799a2f38b63ba48f3efc2ec7b105c3f7034f466c..8814d9dd831bba9384865f2a38f35ca045cf8ea9 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -145,13 +145,13 @@ STATIC void su_save_helem(pTHX_ HV *hv, SV *keysv, SV **svp, I32 preeminent) {
   save_gp((GV *) *svp, 0);
   return;
  }
- if (!preeminent) {
+ if (preeminent)
+  save_helem(hv, keysv, svp);
+ else {
   STRLEN keylen;
   const char * const key = SvPV_const(keysv, keylen);
   SAVEDELETE(hv, savepvn(key, keylen),
                  SvUTF8(keysv) ? -(I32)keylen : (I32)keylen);
- } else {
-  save_helem(hv, keysv, svp);
  }
 }