Re: [PATCH] Re: Storing &PL_sv_undef as a hash key with perl-5.8.x
Nicholas Clark [Fri, 8 Aug 2003 23:30:00 +0000 (00:30 +0100)]
Message-ID: <20030808233000.B20130@plum.flirble.org>

p4raw-id: //depot/perl@20571

ext/Storable/Storable.xs

index 1bf09c1..b714b17 100644 (file)
@@ -1237,13 +1237,13 @@ static void clean_store_context(stcxt_t *cxt)
        if (cxt->hseen) {
                hv_iterinit(cxt->hseen);
                while ((he = hv_iternext(cxt->hseen)))  /* Extra () for -Wall, grr.. */
-                       HeVAL(he) = &PL_sv_placeholder;
+                       HeVAL(he) = &PL_sv_undef;
        }
 
        if (cxt->hclass) {
                hv_iterinit(cxt->hclass);
                while ((he = hv_iternext(cxt->hclass))) /* Extra () for -Wall, grr.. */
-                       HeVAL(he) = &PL_sv_placeholder;
+                       HeVAL(he) = &PL_sv_undef;
        }
 
        /*
@@ -4929,7 +4929,7 @@ static SV *retrieve_flag_hash(stcxt_t *cxt, char *cname)
              */
 
 #ifdef HAS_RESTRICTED_HASHES
-            if (hv_store_flags(hv, kbuf, size, sv, 0, flags) == 0)
+            if (hv_store_flags(hv, kbuf, size, sv, 0, store_flags) == 0)
                 return (SV *) 0;
 #else
             if (!(store_flags & HVhek_PLACEHOLD))