diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-10-16 18:06:44 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-10-20 15:34:23 +0000 |
commit | 33042aafe7427f88db58e555390c82dd25ef9a28 (patch) | |
tree | 56a3df0e0d6d3d27ccdabb89941863b1d942003b /ext | |
parent | 7c4cc0343c223680358a798ea6826c8c3a710db3 (diff) | |
download | perl-33042aafe7427f88db58e555390c82dd25ef9a28.tar.gz |
Fix the build and tests when NODEFAULT_SHAREKEYS is defined
Defining this macro causes newHV() to create hashes without shared hash key
scalars. The default is that hashes are created with shared hash keys.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Devel-Peek/t/Peek.t | 5 | ||||
-rw-r--r-- | ext/XS-APItest/APItest.xs | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 63face8cd1..8c2f113c59 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -98,6 +98,11 @@ sub do_test { if $Config{ccflags} =~ /-DPERL_(?:OLD_COPY_ON_WRITE|NO_COW)\b/ || $] < 5.019003; + if ($Config::Config{ccflags} =~ /-DNODEFAULT_SHAREKEYS\b/) { + $pattern =~ s/,SHAREKEYS\b//g; + $pattern =~ s/\bSHAREKEYS,//g; + $pattern =~ s/\bSHAREKEYS\b//g; + } print $pattern, "\n" if $DEBUG; my ($dump, $dump2) = split m/\*\*\*\*\*\n/, scalar <IN>; print $dump, "\n" if $DEBUG; diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 2b5aeee5fa..f0a2ca3921 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -208,6 +208,10 @@ test_freeent(freeent_function *f) { PL_body_roots[HE_ARENA_ROOT_IX] = HeNEXT(victim); #endif +#ifdef NODEFAULT_SHAREKEYS + HvSHAREKEYS_on(test_hash); +#endif + victim->hent_hek = Perl_share_hek(aTHX_ "", 0, 0); test_scalar = newSV(0); |