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 ################################################################################
23 $var = ($type)SvUV($arg)
25 $var = ($type)SvNV($arg)
27 if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
28 $var = (HV*)SvRV($arg);
30 Perl_croak(aTHX_ \"$var is not a hash reference\")
34 sv_setuv($arg, (UV)$var);
36 sv_setnv($arg, (NV)$var);