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

Re: Custom Ops

Thread Previous | Thread Next
From:
Arthur Bergman
Date:
August 27, 2001 05:40
Subject:
Re: Custom Ops
Message ID:
B7B00C3A.355C%arthur@contiller.se
01-08-27 14.22, skrev Simon Cozens på simon@netthink.co.uk följande:

>>> No. Otherwise we'd already be doing it.
>> We do. dump.c:369
> 
> That seems to be the middle of Perl_pmop_dump. But anyway, my
> point is this: many places in the Perl core say

My bad dump.c:396

> PL_op_desc[o->op_type]
> 
> And they give the right answer. They *don't* say
> 
> PL_op_desc[o->op_type == OP_NULL ? o->op_targ : op_type]
> 
> And yet they still give the right answer. My patch continues
> this trend of getting the right answers.
> 
> Simon

Indeed, and I do not question this. But I find atleast on case that does.

if (o->op_type == OP_NULL)
        {
            Perl_dump_indent(aTHX_ level, file, "  (was %s)\n",
PL_op_name[o->op_t\
arg]);

and I was just wondering if we shouldn't do the right thing here? Not that
it will do the wrong thing with op_custom.


-- 
Arthur


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