This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Magic flags harmonization.
[perl5.git] / cpan / Compress-Raw-Zlib / typemap
CommitLineData
25f0751f
PM
1Compress::Raw::Zlib::gzFile T_PTROBJ
2Compress::Raw::Zlib::deflateStream T_PTROBJ
3Compress::Raw::Zlib::inflateStream T_PTROBJ
4Compress::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
11Bytef * T_PV
12#uInt T_IV
13#uLongf T_IV
14const char * T_PV
15char * T_PV
16uLong T_UV
17z_off_t T_UV
18DualType T_DUAL
19int_undef T_IV_undef
20
21
22#############################################################################
23INPUT
24T_UV
25 $var = (unsigned long)SvUV($arg)
26T_IV_undef
27 if (SvOK($arg))
28 $var = SvIV($arg);
29 else
30 $var = 0 ;
31T_PV
32 if (SvOK($arg))
33 $var = ($type)SvPVbyte_nolen($arg);
34 else
35 $var = NULL ;
36
37T_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#############################################################################
51OUTPUT
52T_UV
53 sv_setuv($arg, (IV)$var);
54
55T_DUAL
56 setDUALstatus($arg, $var) ;
57
58T_PV
59 sv_setpv((SV*)$arg, $var);
60
61