develooper Front page | perl.perl5.porters | Postings from March 2007

Re: [PATCH] MAD prototype checking

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 21, 2007 17:43
Subject:
Re: [PATCH] MAD prototype checking
Message ID:
20070322004445.GJ19003@iabyn.com
On Wed, Mar 21, 2007 at 07:23:43PM +0100, Gerard Goossen wrote:
> skip OP_STUB with MAD prototype checking.
> Things like 'ok 1, "desc", ;' get an additional OP_STUB because of the ","

> commit b698eea8dd6fc27a38c9792043dc7af2929e4a20
> Author: gerard <gerard@tty.nl>
> Date:   Wed Mar 14 19:19:09 2007 +0100
> 
>     PERL_MAD: skip OP_STUB in prototype argument checking
> 
> diff --git a/op.c b/op.c
> index e6af766..6d114dd 100644
> --- a/op.c
> +++ b/op.c
> @@ -7365,6 +7365,12 @@ Perl_ck_subr(pTHX_ OP *o)
>  	o->op_private |= OPpENTERSUB_DB;
>      while (o2 != cvop) {
>  	OP* o3;
> +#ifdef PERL_MAD
> +	if (o2->op_type == OP_STUB) {
> +	    o2 = o2->op_sibling;
> +	    continue;
> +	}
> +#endif
>  	if (PL_madskills && o2->op_type == OP_NULL)
>  	    o3 = ((UNOP*)o2)->op_first;
>  	else

Should this chunk of code also be protected by PL_madskills rather than
ifdef PERL_MAD?


-- 
"There's something wrong with our bloody ships today, Chatfield."
    -- Admiral Beatty at the Battle of Jutland, 31st May 1916.

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