-
Notifications
You must be signed in to change notification settings - Fork 8
/
typemap
140 lines (138 loc) · 3.23 KB
/
typemap
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
BOOL T_BOOL
LONG T_IV
HKEY T_UV
HANDLE T_UV
DWORD T_UV
oDWORD O_UV
UINT T_UV
REGSAM T_UV
SECURITY_INFORMATION T_UV
char * T_BUF
WCHAR * T_BUF
BYTE * T_BUF
void * T_BUF
ValEntA * T_BUF
ValEntW * T_BUF
SECURITY_DESCRIPTOR * T_BUF
SECURITY_ATTRIBUTES * T_BUF
LPOVERLAPPED T_BUF
LONG * T_IVBUF
DWORD * T_UVBUF
LPDWORD T_UVBUF
oDWORD * O_UVBUF
HKEY * T_UVBUFP
oHKEY * O_UVBUFP
FILETIME * T_SBUF
#############################################################################
INPUT
T_BOOL
$var= null_arg($arg)||!SvTRUE($arg) ? ($type)0 : looks_like_number($arg) ? ($type)SvIV($arg) : ($type)1
T_BUF
if( null_arg($arg) )
$var= NULL;
else
$var= ($type) SvPV_nolen( $arg )
T_SBUF
grow_buf( $var,$arg, $type )
T_IV
$var= null_arg($arg) ? ($type)0 : INT2PTR($type,SvIV($arg))
T_UV
$var= null_arg($arg) ? ($type)0 : INT2PTR($type,SvUV($arg))
O_IV
$var= optIV($arg)
O_UV
$var= optUV($arg)
T_IVBUF
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )= SvIV($arg)
T_UVBUF
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )= SvUV($arg)
O_IVBUF
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )=
SvOK($arg) ? SvIV($arg) : 0;
O_UVBUF
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )=
SvOK($arg) ? SvUV($arg) : 0;
T_IVBUFP
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )= (void *)SvIV($arg)
T_UVBUFP
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )= (void *)SvUV($arg)
O_IVBUFP
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )=
SvOK($arg) ? (void *)SvIV($arg) : 0;
O_UVBUFP
if( null_arg($arg) )
$var= NULL;
else
*( $var= ($type) TempAlloc( sizeof(*($var)) ) )=
SvOK($arg) ? (void *)SvUV($arg) : 0;
#############################################################################
OUTPUT
T_BOOL
if( ! null_arg($arg) && ! SvREADONLY($arg) ) {
if( $var ) {
sv_setiv( $arg, (IV)$var );
} else {
sv_setsv( $arg, &PL_sv_no );
}
}
T_BUF
;
T_SBUF
trunc_buf( RETVAL, $var,$arg );
T_IV
if( ! null_arg($arg) && ! SvREADONLY($arg) )
sv_setiv( $arg, PTR2IV($var) );
T_UV
if( ! null_arg($arg) && ! SvREADONLY($arg) )
sv_setuv( $arg, PTR2UV($var) );
O_IV
if( ! null_arg($arg) )
sv_setiv( $arg, PTR2IV($var) );
O_UV
if( ! null_arg($arg) )
sv_setuv( $arg, PTR2UV($var) );
T_IVBUF
if( ! null_arg($arg) && ! SvREADONLY($arg) )
sv_setiv( $arg, (IV)*($var) );
T_UVBUF
if( ! null_arg($arg) && ! SvREADONLY($arg) )
sv_setuv( $arg, (UV)*($var) );
O_IVBUF
if( ! null_arg($arg) )
sv_setiv( $arg, (IV)*($var) );
O_UVBUF
if( ! null_arg($arg) )
sv_setuv( $arg, (UV)*($var) );
T_IVBUFP
if( ! null_arg($arg) && ! SvREADONLY($arg) )
sv_setiv( $arg, (IV)*($var) );
T_UVBUFP
if( ! null_arg($arg) && ! SvREADONLY($arg) )
sv_setuv( $arg, (UV)*($var) );
O_IVBUFP
if( ! null_arg($arg) )
sv_setiv( $arg, (IV)*($var) );
O_UVBUFP
if( ! null_arg($arg) )
sv_setuv( $arg, (UV)*($var) );