diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-08-14 14:24:34 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-09-04 11:08:38 +0200 |
commit | 83519873101c5088b6e33e85da400d6f575c0ceb (patch) | |
tree | 5a84b6605aa22bcb4db7910085ecca051459e92b /op.c | |
parent | 372eab0142c6ca32a90d09218d73cf03c96f35b3 (diff) | |
download | perl-83519873101c5088b6e33e85da400d6f575c0ceb.tar.gz |
In op.c, change S_Slab_to_rw() from an OP * parameter to an OPSLAB *.
This makes it consistent with Perl_Slab_to_ro(), which takes an OPSLAB *.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -262,17 +262,12 @@ Perl_Slab_to_ro(pTHX_ OPSLAB *slab) } STATIC void -S_Slab_to_rw(pTHX_ void *op) +S_Slab_to_rw(pTHX_ OPSLAB *const slab) { - OP * const o = (OP *)op; - OPSLAB *slab; OPSLAB *slab2; PERL_ARGS_ASSERT_SLAB_TO_RW; - if (!o->op_slabbed) return; - - slab = OpSLAB(o); if (!slab->opslab_readonly) return; slab2 = slab; for (; slab2; slab2 = slab2->opslab_next) { @@ -408,7 +403,7 @@ Perl_op_refcnt_inc(pTHX_ OP *o) if(o) { OPSLAB *const slab = o->op_slabbed ? OpSLAB(o) : NULL; if (slab && slab->opslab_readonly) { - Slab_to_rw(o); + Slab_to_rw(slab); ++o->op_targ; Slab_to_ro(slab); } else { @@ -428,7 +423,7 @@ Perl_op_refcnt_dec(pTHX_ OP *o) PERL_ARGS_ASSERT_OP_REFCNT_DEC; if (slab && slab->opslab_readonly) { - Slab_to_rw(o); + Slab_to_rw(slab); result = --o->op_targ; Slab_to_ro(slab); } else { @@ -714,7 +709,8 @@ Perl_op_free(pTHX_ OP *o) if (type == OP_NULL) type = (OPCODE)o->op_targ; - Slab_to_rw(o); + if (o->op_slabbed) + Slab_to_rw(OpSLAB(o)); /* COP* is not cleared by op_clear() so that we may track line * numbers etc even after null() */ |