-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
typemap
45 lines (42 loc) · 1.01 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
B::MAGIC T_MG_OBJ
B::REGEXP T_RX_OBJ
B::COP T_OP_OBJ
B::OP T_OP_OBJ
B::HV T_SV_OBJ
B::PADNAME T_SV_OBJ
B::PADLIST T_SV_OBJ
B::PADNAMELIST T_SV_OBJ
INPUT
T_RX_OBJ
if (SvROK($arg)) {
int type = SvTYPE(SvRV($arg));
if (type == SVt_REGEXP || type == SVt_PVMG) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
}
else
croak(\"ref to $var is of type %d, not a reference to REGEXP\", type);
}
else
croak(\"$var is of type %d, not a reference to REGEXP\", SvTYPE($arg));
T_MG_OBJ
if (SvROK($arg)) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
}
else
croak(\"$var is not a reference\")
T_OP_OBJ
if (SvROK($arg)) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
}
else
croak(\"$var is not a reference\")
T_SV_OBJ
if (SvROK($arg)) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
}
else
croak(\"$var is not a reference\")