File: typemap

package info (click to toggle)
libcompress-raw-zlib-perl 2.084-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,132 kB
  • sloc: ansic: 6,849; perl: 2,812; makefile: 11
file content (62 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Compress::Raw::Zlib::gzFile		T_PTROBJ
Compress::Raw::Zlib::deflateStream	T_PTROBJ
Compress::Raw::Zlib::inflateStream	T_PTROBJ
Compress::Raw::Zlib::inflateScanStream	T_PTROBJ

#Compress::Raw::Zlib::gzFile		T_PTROBJ_AV
#Compress::Raw::Zlib::Deflate		T_PTROBJ_AV
#Compress::Raw::Zlib::Inflate 	T_PTROBJ_AV
#Compress::Raw::Zlib::InflateScan	T_PTROBJ_AV

Bytef *				T_PV
#uInt				T_IV
#uLongf				T_IV
const char *			T_PV
char *			        T_PV
uLong				T_UV
z_off_t				T_UV
STRLEN				T_UV
DualType            T_DUAL
int_undef           T_IV_undef


#############################################################################
INPUT
T_UV
	$var = (unsigned long)SvUV($arg)
T_IV_undef
	if (SvOK($arg))
        $var = SvIV($arg);
    else
        $var = 0 ;
T_PV
	if (SvOK($arg))
            $var = ($type)SvPVbyte_nolen($arg);
	else
            $var = NULL ;

T_PTROBJ_AV
        if ($arg == &PL_sv_undef || $arg == NULL)
            $var = NULL ;
        else if (sv_derived_from($arg, \"${ntype}\")) {
            IV tmp = SvIV(getInnerObject($arg)) ;
            $var = INT2PTR($type, tmp);
            
        }
        else
            croak(\"$var is not of type ${ntype}\")



#############################################################################
OUTPUT
T_UV
	sv_setuv($arg, (IV)$var);

T_DUAL
        setDUALstatus($arg, $var) ;

T_PV
        sv_setpv((SV*)$arg, $var);