use Inline 'C'; use Devel::Peek; my $x; my $v = 2147483648; Dump($v); $x->{T}{z} = force_iv($v); Dump($x->{T}{z}); __END__ __C__ SV* force_iv(SV*v){ return SvNOK(v) ? newSVuv(SvNV(v)) : newSVuv(SvIV(v)); }
In reply to Re: updating hash from perl -> xsub
by borisz
in thread updating hash from perl -> xsub
by mrobinton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |