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

SvFAKE (was Re: pp_add -> pp_i_add efficiency hack?)

Thread Previous | Thread Next
Nick Ing-Simmons
December 12, 2000 07:07
SvFAKE (was Re: pp_add -> pp_i_add efficiency hack?)
Message ID:
Nicholas Clark <> writes:
>How come sv_2iv has
>	if (SvREADONLY(sv) && SvFAKE(sv)) {
>	    sv_force_normal(sv);
>	}
>but sv_2uv and sv_2nv don't have the same code in the similar position?

They don't _need_ it because they both do sv_upgrade() to NV if they
get a POK only SV. sv_upgrade() now does the de-FAKEing.

>Should such code to force_normal be in sv_2nv and sv_2uv?


And I am reminded that 

    else if (SvPOKp(sv) && SvLEN(sv)) {
	I32 numtype = looks_like_number(sv);

why SvLEN() and not SvCUR there ????

>Nicholas Clark
Nick Ing-Simmons <>
Via, but not speaking for: Texas Instruments Ltd.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About