Move Compress::Raw::Zlib from ext/ to cpan/
[perl.git] / cpan / Compress-Raw-Zlib / typemap
1 Compress::Raw::Zlib::gzFile             T_PTROBJ
2 Compress::Raw::Zlib::deflateStream      T_PTROBJ
3 Compress::Raw::Zlib::inflateStream      T_PTROBJ
4 Compress::Raw::Zlib::inflateScanStream  T_PTROBJ
5
6 #Compress::Raw::Zlib::gzFile            T_PTROBJ_AV
7 #Compress::Raw::Zlib::Deflate           T_PTROBJ_AV
8 #Compress::Raw::Zlib::Inflate   T_PTROBJ_AV
9 #Compress::Raw::Zlib::InflateScan       T_PTROBJ_AV
10
11 Bytef *                         T_PV
12 #uInt                           T_IV
13 #uLongf                         T_IV
14 const char *                    T_PV
15 char *                          T_PV
16 uLong                           T_UV
17 z_off_t                         T_UV
18 DualType                        T_DUAL
19 int_undef           T_IV_undef
20
21
22 #############################################################################
23 INPUT
24 T_UV
25         $var = (unsigned long)SvUV($arg)
26 T_IV_undef
27         if (SvOK($arg))
28         $var = SvIV($arg);
29     else
30         $var = 0 ;
31 T_PV
32         if (SvOK($arg))
33             $var = ($type)SvPVbyte_nolen($arg);
34         else
35             $var = NULL ;
36
37 T_PTROBJ_AV
38         if ($arg == &PL_sv_undef || $arg == NULL)
39             $var = NULL ;
40         else if (sv_derived_from($arg, \"${ntype}\")) {
41             IV tmp = SvIV(getInnerObject($arg)) ;
42             $var = INT2PTR($type, tmp);
43             
44         }
45         else
46             croak(\"$var is not of type ${ntype}\")
47
48
49
50 #############################################################################
51 OUTPUT
52 T_UV
53         sv_setuv($arg, (IV)$var);
54
55 T_DUAL
56         setDUALstatus($arg, $var) ;
57
58 T_PV
59         sv_setpv((SV*)$arg, $var);
60
61