1 ################################################################################
3 # typemap -- XS type mappings not present in early perls
5 ################################################################################
7 # Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
8 # Version 2.x, Copyright (C) 2001, Paul Marquess.
9 # Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
11 # This program is free software; you can redistribute it and/or
12 # modify it under the same terms as Perl itself.
14 ################################################################################
22 $var = ($type)SvUV($arg)
24 $var = ($type)SvNV($arg)
26 if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
27 $var = (HV*)SvRV($arg);
29 Perl_croak(aTHX_ \"$var is not a hash reference\")
33 sv_setuv($arg, (UV)$var);
35 sv_setnv($arg, (NV)$var);