This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the tests for hv_free_ent and hv_delayfree_ent pass under
authorNicholas Clark <nick@ccl4.org>
Mon, 4 Jul 2005 19:07:31 +0000 (19:07 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 4 Jul 2005 19:07:31 +0000 (19:07 +0000)
-DPURIFY too.

p4raw-id: //depot/perl@25078

ext/XS/APItest/APItest.xs

index 82479bb..7905a93 100644 (file)
@@ -20,6 +20,9 @@ test_freeent(freeent_function *f) {
     U32 results[4];
     int i;
 
+#ifdef PURIFY
+    victim = (HE*)safemalloc(sizeof(HE));
+#else
     /* Storing then deleting something should ensure that a hash entry is
        available.  */
     hv_store(test_hash, "", 0, &PL_sv_yes, 0);
@@ -29,9 +32,9 @@ test_freeent(freeent_function *f) {
        test expect to be able to call del_HE on the HE  */
     if (!PL_he_root)
        croak("PL_he_root is 0");
-
     victim = PL_he_root;
     PL_he_root = HeNEXT(victim);
+#endif
 
     victim->hent_hek = Perl_share_hek(aTHX_ "", 0, 0);