On Mon, Jan 19, 2004 at 08:23:05PM +0000, Nick Ing-Simmons wrote:
> But beware perl thinking it knows what it is doing in such cases.
> It will only use the IV slot if SvIOK is set, but if it isn't and 
> there is an SvPOK set then it will do perl's conversion 
> of string to IV and overwite your IV. Possibly worse if you say 
> it has IV and it wants a string it is likely to convert IV to string
> and write it over the SvPV slot.

Probably best to set the 3 private flags on with SvIOKp() SvNOKp() and
SvPOKp(), which IIRC will effectively disable the conversions
(but check the code paths in sv_2iv, sv_2nv, sv_2pv in sv.c, and if anyone
making these undocumented assumptions about the SV internals may get bitten
by changes)

Nicholas Clark

Reply via email to