develooper Front page | perl.perl5.porters | Postings from November 2013

Re: Padlist NULL pointer?

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
November 2, 2013 19:58
Subject:
Re: Padlist NULL pointer?
Message ID:
20131102195825.2013.qmail@lists-nntp.develooper.com
Marc Lehmann wrote:
> I don't like the while loop, but I can't see how one can be avoided. I
> wonder if I could just steal the pad at CvDEPTH + 1 by null'ing it.

Yes, I think that would work.

pad_push does this:

    if (depth > PadlistMAX(padlist) || !PadlistARRAY(padlist)[depth]) {
    if (depth > PadlistMAX(padlist) || !PadlistARRAY(padlist)[depth]) {...
    if (depth > PadlistMAX(padlist) || !PadlistARRAY(padlist)[depth]) {...padlist_store(padlist, depth, newpad);

And padlist_store does:

    ary = PadlistARRAY(padlist);
    SvREFCNT_dec(ary[key]);
    ary[key] = val;


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