File: typemap

package info (click to toggle)
libb-utils-perl 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 436 kB
  • sloc: perl: 633; ansic: 37; makefile: 2
file content (96 lines) | stat: -rw-r--r-- 1,662 bytes parent folder | download | duplicates (4)
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
TYPEMAP

OP *            T_OP_OBJ
B::OP		T_OP_OBJ
B::UNOP		T_OP_OBJ
B::BINOP	T_OP_OBJ
B::LOGOP	T_OP_OBJ
B::LISTOP	T_OP_OBJ
B::PMOP		T_OP_OBJ
B::SVOP		T_OP_OBJ
B::PADOP	T_OP_OBJ
B::PVOP		T_OP_OBJ
B::LOOP		T_OP_OBJ
B::COP		T_OP_OBJ

B::SV		T_SV_OBJ
B::PV		T_SV_OBJ
B::IV		T_SV_OBJ
B::NV		T_SV_OBJ
B::PVMG		T_SV_OBJ
B::REGEXP	T_SV_OBJ
B::PVLV		T_SV_OBJ
B::BM		T_SV_OBJ
B::RV		T_SV_OBJ
B::GV		T_SV_OBJ
B::CV		T_SV_OBJ
B::HV		T_SV_OBJ
B::AV		T_SV_OBJ
B::IO		T_SV_OBJ
B::FM		T_SV_OBJ

B::MAGIC	T_MG_OBJ
SSize_t		T_IV
STRLEN		T_UV
PADOFFSET	T_UV

B::HE		T_HE_OBJ
B::RHE		T_RHE_OBJ

INPUT
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\")

T_MG_OBJ
	if (SvROK($arg)) {
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = INT2PTR($type,tmp);
	}
	else
	    croak(\"$var is not a reference\")

T_HE_OBJ
	if (SvROK($arg)) {
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = INT2PTR($type,tmp);
	}
	else
	    croak(\"$var is not a reference\")

T_RHE_OBJ
	if (SvROK($arg)) {
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = INT2PTR($type,tmp);
	}
	else
	    croak(\"$var is not a reference\")

OUTPUT
T_OP_OBJ
	sv_setiv(newSVrv($arg, BUtils_cc_opclassname(aTHX_ (OP*)$var)), PTR2IV($var));

T_SV_OBJ
	BUtils_make_sv_object(aTHX_ ($arg), (SV*)($var));


T_MG_OBJ
	sv_setiv(newSVrv($arg, "B::MAGIC"), PTR2IV($var));

T_HE_OBJ
	sv_setiv(newSVrv($arg, "B::HE"), PTR2IV($var));

T_RHE_OBJ
	sv_setiv(newSVrv($arg, "B::RHE"), PTR2IV($var));