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

Re: @ISA lookup issue in blead and maint-5.10

Thread Previous | Thread Next
From:
Jim Cromie
Date:
August 5, 2009 08:51
Subject:
Re: @ISA lookup issue in blead and maint-5.10
Message ID:
cfe85dfa0908050851m1d93b5a2ta4983ccf50b59bfa@mail.gmail.com
> I believe I've fixed the problem in blead with 1375cf1cf2085f851bb17604
>
> diff --git a/mro.c b/mro.c
> index fe77647..23f8c07 100644
> --- a/mro.c
> +++ b/mro.c
> @@ -438,7 +438,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
>     if(meta->mro_nextmethod) hv_clear(meta->mro_nextmethod);
>
>     /* Iterate the isarev (classes that are our children),
> -       wiping out their linearization and method caches */
> +       wiping out their linearization, method and isa caches */
>     if(isarev) {
>         hv_iterinit(isarev);
>         while((iter = hv_iternext(isarev))) {
> @@ -463,6 +463,10 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
>                 revmeta->cache_gen++;
>             if(revmeta->mro_nextmethod)
>                 hv_clear(revmeta->mro_nextmethod);
> +           if (revmeta->isa) {
> +               SvREFCNT_dec(revmeta->isa);


what happens if refcnt > 1  ?
It apparently doesnt happen now
(or if it does, it evades current tests).



> +               revmeta->isa = NULL;
> +           }
>         }
>     }
>

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