develooper Front page | perl.ponie.changes | Postings from March 2006

[svn:ponie] r401 - branches/5.9.3merge/perl

From:
nicholas
Date:
March 17, 2006 14:35
Subject:
[svn:ponie] r401 - branches/5.9.3merge/perl
Message ID:
20060317223451.88DCECBA2B@x12.develooper.com
Author: nicholas
Date: Fri Mar 17 14:34:50 2006
New Revision: 401

Modified:
   branches/5.9.3merge/perl/hv.c

Log:
Remove an assertion from hv.c that isn't true with the old hv_iterinit().


Modified: branches/5.9.3merge/perl/hv.c
==============================================================================
--- branches/5.9.3merge/perl/hv.c	(original)
+++ branches/5.9.3merge/perl/hv.c	Fri Mar 17 14:34:50 2006
@@ -1814,8 +1814,10 @@
     }
 #endif
 
-    /* hv_iterint now ensures this.  */
-    assert (HvARRAY(hv));
+    if (!HvARRAY(hv))
+	Newxz(*((char **)&(HvARRAY(hv))),
+	      PERL_HV_ARRAY_ALLOC_BYTES(HvMAX(hv)+1),
+	      char);
 
     /* At start of hash, entry is NULL.  */
     if (entry)



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About