better document macros taking literal strings
[perl.git] / ext / B / typemap
1 TYPEMAP
2
3 B::OP           T_OP_OBJ
4 B::UNOP         T_OP_OBJ
5 B::BINOP        T_OP_OBJ
6 B::LOGOP        T_OP_OBJ
7 B::LISTOP       T_OP_OBJ
8 B::PMOP         T_OP_OBJ
9 B::SVOP         T_OP_OBJ
10 B::PADOP        T_OP_OBJ
11 B::PVOP         T_OP_OBJ
12 B::LOOP         T_OP_OBJ
13 B::COP          T_OP_OBJ
14
15 B::SV           T_SV_OBJ
16 B::PV           T_SV_OBJ
17 B::IV           T_SV_OBJ
18 B::NV           T_SV_OBJ
19 B::PVMG         T_SV_OBJ
20 B::REGEXP       T_SV_OBJ
21 B::PVLV         T_SV_OBJ
22 B::BM           T_SV_OBJ
23 B::RV           T_SV_OBJ
24 B::GV           T_SV_OBJ
25 B::CV           T_SV_OBJ
26 B::HV           T_SV_OBJ
27 B::AV           T_SV_OBJ
28 B::IO           T_SV_OBJ
29 B::FM           T_SV_OBJ
30
31 B::MAGIC        T_MG_OBJ
32 SSize_t         T_IV
33 STRLEN          T_UV
34 PADOFFSET       T_UV
35
36 B::HE           T_HE_OBJ
37 B::RHE          T_RHE_OBJ
38
39 B::PADLIST      T_PL_OBJ
40 B::PADNAMELIST  T_PNL_OBJ
41 B::PADNAME      T_PN_OBJ
42
43 INPUT
44 T_OP_OBJ
45         if (SvROK($arg)) {
46             IV tmp = SvIV((SV*)SvRV($arg));
47             $var = INT2PTR($type,tmp);
48         }
49         else
50             croak(\"$var is not a reference\")
51
52 T_SV_OBJ
53         if (SvROK($arg)) {
54             IV tmp = SvIV((SV*)SvRV($arg));
55             $var = INT2PTR($type,tmp);
56         }
57         else
58             croak(\"$var is not a reference\")
59
60 T_MG_OBJ
61         if (SvROK($arg)) {
62             IV tmp = SvIV((SV*)SvRV($arg));
63             $var = INT2PTR($type,tmp);
64         }
65         else
66             croak(\"$var is not a reference\")
67
68 T_HE_OBJ
69         if (SvROK($arg)) {
70             IV tmp = SvIV((SV*)SvRV($arg));
71             $var = INT2PTR($type,tmp);
72         }
73         else
74             croak(\"$var is not a reference\")
75
76 T_RHE_OBJ
77         if (SvROK($arg)) {
78             IV tmp = SvIV((SV*)SvRV($arg));
79             $var = INT2PTR($type,tmp);
80         }
81         else
82             croak(\"$var is not a reference\")
83
84 T_PL_OBJ
85         if (SvROK($arg)) {
86             IV tmp = SvIV((SV*)SvRV($arg));
87             $var = INT2PTR($type,tmp);
88         }
89         else
90             croak(\"$var is not a reference\")
91
92 T_PNL_OBJ
93         if (SvROK($arg)) {
94             IV tmp = SvIV((SV*)SvRV($arg));
95             $var = INT2PTR($type,tmp);
96         }
97         else
98             croak(\"$var is not a reference\")
99
100 T_PN_OBJ
101         if (SvROK($arg)) {
102             IV tmp = SvIV((SV*)SvRV($arg));
103             $var = INT2PTR($type,tmp);
104         }
105         else
106             croak(\"$var is not a reference\")
107
108 OUTPUT
109 T_MG_OBJ
110         sv_setiv(newSVrv($arg, "B::MAGIC"), PTR2IV($var));
111
112 T_HE_OBJ
113         sv_setiv(newSVrv($arg, "B::HE"), PTR2IV($var));
114
115 T_RHE_OBJ
116         sv_setiv(newSVrv($arg, "B::RHE"), PTR2IV($var));
117
118 T_PL_OBJ
119         sv_setiv(newSVrv($arg, $var ? "B::PADLIST" : "B::NULL"),
120                  PTR2IV($var));
121
122 T_PNL_OBJ
123         sv_setiv(newSVrv($arg, $var ? "B::PADNAMELIST" : "B::NULL"),
124                  PTR2IV($var));
125
126 T_PN_OBJ
127         sv_setiv(newSVrv($arg, $var ? "B::PADNAME" : "B::SPECIAL"),
128                  PTR2IV($var));