This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Removed a redundant o->op_type
authorAndy Lester <andy@petdance.com>
Mon, 27 Feb 2006 14:20:43 +0000 (08:20 -0600)
committerNicholas Clark <nick@ccl4.org>
Mon, 27 Feb 2006 21:10:21 +0000 (21:10 +0000)
Message-ID: <20060227202043.GA7783@petdance.com>
Date: Mon, 27 Feb 2006 14:20:43 -0600

p4raw-id: //depot/perl@27349

op.c

diff --git a/op.c b/op.c
index a63b6ae..53b9861 100644 (file)
--- a/op.c
+++ b/op.c
@@ -272,24 +272,27 @@ Perl_op_free(pTHX_ OP *o)
 {
     dVAR;
     OPCODE type;
-    PADOFFSET refcnt;
 
     if (!o || o->op_static)
        return;
 
+    type = o->op_type;
     if (o->op_private & OPpREFCOUNTED) {
-       switch (o->op_type) {
+       switch (type) {
        case OP_LEAVESUB:
        case OP_LEAVESUBLV:
        case OP_LEAVEEVAL:
        case OP_LEAVE:
        case OP_SCOPE:
        case OP_LEAVEWRITE:
+           {
+           PADOFFSET refcnt;
            OP_REFCNT_LOCK;
            refcnt = OpREFCNT_dec(o);
            OP_REFCNT_UNLOCK;
            if (refcnt)
                return;
+           }
            break;
        default:
            break;