This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
First class regexps.
[perl5.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 INPUT
40 T_OP_OBJ
41         if (SvROK($arg)) {
42             IV tmp = SvIV((SV*)SvRV($arg));
43             $var = INT2PTR($type,tmp);
44         }
45         else
46             croak(\"$var is not a reference\")
47
48 T_SV_OBJ
49         if (SvROK($arg)) {
50             IV tmp = SvIV((SV*)SvRV($arg));
51             $var = INT2PTR($type,tmp);
52         }
53         else
54             croak(\"$var is not a reference\")
55
56 T_MG_OBJ
57         if (SvROK($arg)) {
58             IV tmp = SvIV((SV*)SvRV($arg));
59             $var = INT2PTR($type,tmp);
60         }
61         else
62             croak(\"$var is not a reference\")
63
64 T_HE_OBJ
65         if (SvROK($arg)) {
66             IV tmp = SvIV((SV*)SvRV($arg));
67             $var = INT2PTR($type,tmp);
68         }
69         else
70             croak(\"$var is not a reference\")
71
72 T_RHE_OBJ
73         if (SvROK($arg)) {
74             IV tmp = SvIV((SV*)SvRV($arg));
75             $var = INT2PTR($type,tmp);
76         }
77         else
78             croak(\"$var is not a reference\")
79
80 OUTPUT
81 T_OP_OBJ
82         sv_setiv(newSVrv($arg, cc_opclassname(aTHX_ (OP*)$var)), PTR2IV($var));
83
84 T_SV_OBJ
85         make_sv_object(aTHX_ ($arg), (SV*)($var));
86
87
88 T_MG_OBJ
89         sv_setiv(newSVrv($arg, "B::MAGIC"), PTR2IV($var));
90
91 T_HE_OBJ
92         sv_setiv(newSVrv($arg, "B::HE"), PTR2IV($var));
93
94 T_RHE_OBJ
95         sv_setiv(newSVrv($arg, "B::RHE"), PTR2IV($var));