On Jul 7, 2005, at 9:44 PM, Sisyphus wrote:
I don't get those warnings - but then my IV is only 4 bytes. What's
your 4
byte integer called ? .... short ? .... long ? Assuming it's a short:
return ((Soldier*)(unsigned short)SvIV(SvRV(obj)))->name;
4 bytes on this machine is a long. If I typecast the pointer to an
intermediate long, that would eliminate the warning here, but it
wouldn't be portable to any machine that uses 8 bytes for pointer
values.
I think I'm stuck, because however Perl is determining how many bytes
an IV has to be in order to guarantee that it will hold a pointer, I
don't think I can do any better.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/