develooper Front page | perl.perl5.porters | Postings from January 2001

Re: [PATCH] lvalue hash and array elements

Thread Previous | Thread Next
From:
Simon Cozens
Date:
January 4, 2001 02:38
Subject:
Re: [PATCH] lvalue hash and array elements
Message ID:
20010104103748.B29202@deep-dark-truthful-mirror.perlhacker.org
On Wed, Jan 03, 2001 at 11:31:09PM -0800, Stephen McCamant wrote:
> SC> #define LVRET (PL_op->op_next
>                       && (PL_op->op_next->op_type == OP_LEAVESUBLV || \
> SC>             (PL_op->op_next->op_type == OP_RETURN) && ( \
> SC>             (&cxstack[cxstack_ix])->blk_sub.lval && \
> SC>             CvLVALUE((&cxstack[cxstack_ix])->blk_sub.cv))))
> 
> SC> ?
> 
> What I think you need to be testing for correctness is
> ((NEXT && (LVSB || RET)) && RUNT

But what I want to be testing is 
 ((NEXT && (LVSB || RET) && RUNT)
which is logically equivalent, but I typoed. Here we go:

#define LVRET (PL_op->op_next
            && (PL_op->op_next->op_type == OP_LEAVESUBLV || \
            PL_op->op_next->op_type == OP_RETURN) && ( \
            (&cxstack[cxstack_ix])->blk_sub.lval && \
            CvLVALUE((&cxstack[cxstack_ix])->blk_sub.cv)))

-- 
Skud's Law: The surreality of the universe tends toward a maximum.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About