In mro_get_linear_isa_c3() optimise even if AvARRAY(isa_lin) is NULL.
Nicholas Clark [Fri, 21 Aug 2009 08:40:03 +0000 (09:40 +0100)]
It can only be NULL if AvFILLp(isa_lin) is -1, and the code in the fast path
block will work cleanly in that case too.

ext/mro/mro.xs

index d9451b6..92be620 100644 (file)
@@ -91,7 +91,7 @@ S_mro_get_linear_isa_c3(pTHX_ HV* stash, U32 level)
                 AV* const isa_lin
                  = S_mro_get_linear_isa_c3(aTHX_ isa_item_stash, level + 1);
 
-               if(items == 0 && AvFILLp(seqs) == -1 && AvARRAY(isa_lin)) {
+               if(items == 0 && AvFILLp(seqs) == -1) {
                    /* Only one parent class. For this case, the C3
                       linearisation is this class followed by the parent's
                       inearisation, so don't bother with the expensive