summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-09-01 14:47:38 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-09-01 14:47:38 -0700
commit3df5c4b513c5e5c2f25d831f556f2a1c5693ce98 (patch)
treedf8369277985791b3c6d12df55c52c32bcb95b1d /mro.c
parentcbf45e8454c586302a9f324433b3155521872636 (diff)
downloadperl-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mro.c b/mro.c
index 2ce9fa2da3..18dfa8c011 100644
--- a/mro.c
+++ b/mro.c
@@ -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,