This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
948fdcd977bc0da2595d41f88a9069d4c9226b5e
[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::GVOP         T_OP_OBJ
11 B::PVOP         T_OP_OBJ
12 B::CVOP         T_OP_OBJ
13 B::LOOP         T_OP_OBJ
14 B::COP          T_OP_OBJ
15
16 B::SV           T_SV_OBJ
17 B::PV           T_SV_OBJ
18 B::IV           T_SV_OBJ
19 B::NV           T_SV_OBJ
20 B::PVMG         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
30 B::MAGIC        T_MG_OBJ
31 SSize_t         T_IV
32 STRLEN          T_IV
33
34 INPUT
35 T_OP_OBJ
36         if (SvROK($arg)) {
37             IV tmp = SvIV((SV*)SvRV($arg));
38             $var = ($type) tmp;
39         }
40         else
41             croak(\"$var is not a reference\")
42
43 T_SV_OBJ
44         if (SvROK($arg)) {
45             IV tmp = SvIV((SV*)SvRV($arg));
46             $var = ($type) tmp;
47         }
48         else
49             croak(\"$var is not a reference\")
50
51 T_MG_OBJ
52         if (SvROK($arg)) {
53             IV tmp = SvIV((SV*)SvRV($arg));
54             $var = ($type) tmp;
55         }
56         else
57             croak(\"$var is not a reference\")
58
59 OUTPUT
60 T_OP_OBJ
61         sv_setiv(newSVrv($arg, cc_opclassname(aTHX_ (OP*)$var)), (IV)$var);
62
63 T_SV_OBJ
64         make_sv_object(aTHX_ ($arg), (SV*)($var));
65
66
67 T_MG_OBJ
68         sv_setiv(newSVrv($arg, "B::MAGIC"), (IV)$var);