develooper Front page | perl.perl5.porters | Postings from December 2004

Re: excessive swash init?

Thread Previous
From:
hv
Date:
December 31, 2004 06:49
Subject:
Re: excessive swash init?
Message ID:
200412311453.iBVErnL19524@zen.crypt.org
Nicholas Clark <nick@ccl4.org> wrote:
:It looks like this logic is incorrect:
:
:	    si = *ary;
:	    a  = SvTYPE(ary[1]) == SVt_RV   ? &ary[1] : 0;
:	    b  = SvTYPE(ary[2]) == SVt_PVAV ? &ary[2] : 0;
[...]
:Would it be reasonable to replace that SvTYPE check with an SvROK check?

Looks reasonable to me. Do you understand what caused the sv to get
upgraded to PVMG? The only problems are likely to occur when the sv
actually has magic attached, and it gets passed to one of the standard
sv.c functions which will attempt to execute code associated with that
magic in a non-reentrant fashion.

(I better stop waving my arms now, I think I see Don Quixote taking
a run up.)

Hugo

Thread Previous


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