There's no such thing as a SvUV. A ref can be in practically any type of SV (at least SvIV, SvNV, SvPV, SvPVIV, SvPVNV).
>perl -MDevel::Peek -e"my $x = {}; Dump($x);" SV = IV(0x3269b8) at 0x3269c0 REFCNT = 1 FLAGS = (PADMY,ROK) ... >perl -MDevel::Peek -e"my $x = 'abc'; $x = {}; Dump($x);" SV = PV(0x33abe0) at 0x2a69d0 REFCNT = 1 FLAGS = (PADMY,ROK) ... >perl -MDevel::Peek -e"my $x = 'abc'; $x = 123; $x = {}; Dump($x);" SV = PVIV(0x28da78) at 0x2a6a60 REFCNT = 1 FLAGS = (PADMY,ROK) ...
A reference is indicated by the ROK flag. The pointers of references are neither IV nor UV. The pointers are returned as SV* as they should. The actual pointer is located in the same location as an IV's number or UV's number, so ROK && IOK is impossible.
Update: It appears possible to have an SV that is both ROK and IOK. It would have to be hand-crafted; Perl never constructs one. No idea if it's safe to construct one.
In reply to Re: SvUV vs SvIV for pointers in SVs, typemap
by ikegami
in thread SvUV vs SvIV for pointers in SVs, typemap
by patcat88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |