Keep It Simple, Stupid | |
PerlMonks |
Re^3: XS: returning a 64-bit unsigned int?by ikegami (Patriarch) |
on Sep 27, 2011 at 07:33 UTC ( [id://928036]=note: print w/replies, xml ) | Need Help?? |
The UV version turns on IOK and *preserves* IsUV instead of turning on IOK and IsUV. The other two don't preserve anything. I don't know why the difference. There is a SvIsUV_on(sv) that would have done the trick. Keep in mind that your original approach didn't converting the scalar to one that supports IVs (if possible) and you didn't handle magic. If it's just an internal scalar, you could get away with not doing those, though.
In Section
Seekers of Perl Wisdom
|
|