diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-01 14:47:38 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-09-01 14:47:38 -0700 |
commit | 3df5c4b513c5e5c2f25d831f556f2a1c5693ce98 (patch) | |
tree | df8369277985791b3c6d12df55c52c32bcb95b1d /mro.c | |
parent | cbf45e8454c586302a9f324433b3155521872636 (diff) | |
download | perl-3df5c4b513c5e5c2f25d831f556f2a1c5693ce98.tar.gz |
Teach mro code about null array elements
This is part of ticket #119433.
Commit ce0d49f changed AVs to use NULL for nonexistent elements. The
mro lookup code was not accounting for that, causing Class::Contract’s
tests to crash (and perhaps other modules, too).
Diffstat (limited to 'mro.c')
-rw-r--r-- | mro.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -269,10 +269,11 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level) /* foreach(@ISA) */ while (items--) { - SV* const sv = *svp++; + SV* const sv = *svp ? *svp : &PL_sv_undef; HV* const basestash = gv_stashsv(sv, 0); SV *const *subrv_p; I32 subrv_items; + svp++; if (!basestash) { /* if no stash exists for this @ISA member, |