diff options
author | David Mitchell <davem@iabyn.com> | 2015-04-15 16:05:05 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2015-04-19 18:42:00 +0100 |
commit | 93059c1aaf5fd5adc05efe29bdcc6c719aef3108 (patch) | |
tree | 7f6280f48aa2bc55d9578f27cb9f4337224f6ef8 /op.c | |
parent | ba7f043cd8beaaa711b275c2a15eb10e1f9ab7f8 (diff) | |
download | perl-93059c1aaf5fd5adc05efe29bdcc6c719aef3108.tar.gz |
skip some asserts on non-PERL_OP_PARENT builds
Some asserts I added for for the op_lastsib stuff, while correct
on non-PERL_OP_PARENT builds, aren't necessary, and just increase the
risk of breakage of some hypothetical CPAN module that is doing strange
things.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -299,7 +299,9 @@ Perl_Slab_Alloc(pTHX_ size_t sz) gotit: /* lastsib == 1, op_sibling == 0 implies a solitary unattached op */ o->op_lastsib = 1; +#ifdef PERL_OP_PARENT assert(!o->op_sibling); +#endif return (void *)o; } @@ -2554,14 +2556,8 @@ S_finalize_op(pTHX_ OP* o) assert(kid->op_sibling == o); } # else - if (OpHAS_SIBLING(kid)) { - assert(!kid->op_lastsib); - } - else { - assert(kid->op_lastsib); - if (has_last) - assert(kid == cLISTOPo->op_last); - } + if (has_last && !OpHAS_SIBLING(kid)) + assert(kid == cLISTOPo->op_last); # endif } #endif |