From: Nicholas Clark Date: Mon, 4 Jul 2005 19:07:31 +0000 (+0000) Subject: Make the tests for hv_free_ent and hv_delayfree_ent pass under X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8afd2d2ecb560202b631f95a6aff50e34dd49052;p=p5sagit%2Fp5-mst-13.2.git Make the tests for hv_free_ent and hv_delayfree_ent pass under -DPURIFY too. p4raw-id: //depot/perl@25078 --- diff --git a/ext/XS/APItest/APItest.xs b/ext/XS/APItest/APItest.xs index 82479bb..7905a93 100644 --- a/ext/XS/APItest/APItest.xs +++ b/ext/XS/APItest/APItest.xs @@ -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);