This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Archive-Tar to CPAN version 2.00
[perl5.git] / cpan / Compress-Raw-Bzip2 / typemap
CommitLineData
bdb7fd9f
RGS
1Compress::Raw::Bzip2 T_PTROBJ
2Compress::Raw::Bunzip2 T_PTROBJ
3
4const char * T_PV
5char * T_PV
6uLong T_UV
7z_off_t T_UV
8DualType T_DUAL
9int_undef T_IV_undef
10
11
12#############################################################################
13INPUT
14T_UV
15 $var = (unsigned long)SvUV($arg)
16T_IV_undef
17 if (SvOK($arg))
18 $var = SvIV($arg);
19 else
20 $var = 0 ;
21T_PV
22 if (SvOK($arg))
23 $var = ($type)SvPVbyte_nolen($arg);
24 else
25 $var = NULL ;
26
27T_PTROBJ_AV
28 if ($arg == &PL_sv_undef || $arg == NULL)
29 $var = NULL ;
30 else if (sv_derived_from($arg, \"${ntype}\")) {
31 IV tmp = SvIV(getInnerObject($arg)) ;
32 $var = INT2PTR($type, tmp);
33
34 }
35 else
36 croak(\"$var is not of type ${ntype}\")
37
38
39
40#############################################################################
41OUTPUT
42T_UV
43 sv_setuv($arg, (IV)$var);
44
45
46T_DUAL
47 setDUALstatus($arg, $var) ;
48
49
50T_PV
51 sv_setpv((SV*)$arg, $var);
52
53
54