From: Nicholas Clark Date: Fri, 21 Aug 2009 08:40:03 +0000 (+0100) Subject: In mro_get_linear_isa_c3() optimise even if AvARRAY(isa_lin) is NULL. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a18d9f20d1de8843127a2b32b9d608c7d2a1b7b9;p=p5sagit%2Fp5-mst-13.2.git In mro_get_linear_isa_c3() optimise even if AvARRAY(isa_lin) is NULL. 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. --- diff --git a/ext/mro/mro.xs b/ext/mro/mro.xs index d9451b6..92be620 100644 --- a/ext/mro/mro.xs +++ b/ext/mro/mro.xs @@ -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