Skip to content

Commit

Permalink
C: fix #140. reset HvTOTALKEYS also on 5.14 on empty hashes
Browse files Browse the repository at this point in the history
This new HvTOTALKEYS macro apparently sneeked into 5.14 also
  • Loading branch information
Reini Urban committed Oct 30, 2013
1 parent 74cfffe commit 43902ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/B/C.pm
Expand Up @@ -3935,8 +3935,8 @@ sub B::HV::save {
$init->add("}");
$init->split;
}
} elsif ($] >= 5.015) { # empty contents still needs to set keys=0
# test 36
} elsif ($] >= 5.014) { # empty contents still needs to set keys=0
# test 36, 140
$init->add( "HvTOTALKEYS($sym) = 0;");
$init->add( "SvREADONLY_on($sym);") if $hv->FLAGS & SVf_READONLY;
}
Expand Down
7 changes: 7 additions & 0 deletions t/modules.t
Expand Up @@ -284,6 +284,10 @@ sub is_todo {
# MooseX::Types
# DateTime
#)) { return '> 5.15 (unshare_hek)' if $_ eq $module; }}
if ($] >= 5.018) { foreach(qw(
ExtUtils::ParseXS
Module::Build
)) { return '>= 5.18' if $_ eq $module; }}

# ---------------------------------------
if ($Config{useithreads}) {
Expand Down Expand Up @@ -321,6 +325,9 @@ sub is_todo {
Storable
Sub::Name
)) { return '5.12.0 with threads' if $_ eq $module; }}
if ($] >= 5.018) { foreach(qw(
ExtUtils::CBuilder
)) { return '>= 5.18 with threads' if $_ eq $module; }}
} else { #no threads --------------------------------
# This was related to aelemfast->sv with SPECIAL pads fixed with 033d200
if ($] > 5.008004 and $] <= 5.008005) { foreach(qw(
Expand Down
3 changes: 3 additions & 0 deletions t/testc.sh
Expand Up @@ -537,6 +537,9 @@ fi
#issue 138
tests[138]='print map { chr $_ } qw/97 98 99/;'
result[138]='abc'
#issue 140
tests[140]='my %a;print "ok" if !%a;'
result[140]='ok'
#issue 30
tests[230]='sub f1 { my($self) = @_; $self->f2;} sub f2 {} sub new {} print "@ARGV\n";'
result[230]=''
Expand Down

0 comments on commit 43902ed

Please sign in to comment.