This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/apicheck.pl: Don't test macros with weird params
[perl5.git] / dist / Devel-PPPort / typemap
1 ################################################################################
2 #
3 #  typemap -- XS type mappings not present in early perls
4 #
5 ################################################################################
6 #
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.
10 #
11 #  This program is free software; you can redistribute it and/or
12 #  modify it under the same terms as Perl itself.
13 #
14 ################################################################################
15
16 UV                      T_UV
17 NV                      T_NV
18 HV *                    T_HVREF
19 STRLEN                  T_UV
20
21 INPUT
22 T_UV
23         $var = ($type)SvUV($arg)
24 T_NV
25         $var = ($type)SvNV($arg)
26 T_HVREF
27         if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
28             $var = (HV*)SvRV($arg);
29         else
30             Perl_croak(aTHX_ \"$var is not a hash reference\")
31
32 OUTPUT
33 T_UV
34         sv_setuv($arg, (UV)$var);
35 T_NV
36         sv_setnv($arg, (NV)$var);