blib/lib/ExtUtils/XSpp/Typemap/reference.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 80.0% 4 / 5 totaltotal 90.0% 27 / 30 CC 2 SCAR 2.6
CC
2
Cov
89%
init
2.0
BEGIN
1.0
cpp_type
1.0
CRAP 1.3
« blib/lib/ExtUtils/XSpp/Exception/stdmessage.pm ↑ Summary blib/lib/ExtUtils/XSpp/Typemap/simple.pm »
1 package ExtUtils::XSpp::Typemap::reference;
2  
3 21 ▶use base 'ExtUtils::XSpp::Typemap';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 59 ▶sub init {
Subroutine init: called CC=2 SCAR=7.1
Pod undocumented
6 59 my $this = shift;
7 59 my %args = @_;
8  
9 59 ▶ if( my $base = $args{base} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $base = $args{"base"}) 0 59 59
10 %args = ( xs_type => $base->{XS_TYPE},
11 xs_input_code => $base->{XS_INPUT_CODE},
12 xs_output_code => $base->{XS_OUTPUT_CODE},
13 0 %args );
14 }
15  
16 59 $this->{XS_TYPE} = $args{xs_type};
17 59 $this->{NAME} = $args{name};
18 59 $this->{TYPE} = $args{type};
19 }
20  
21 14 ▶sub cpp_type {
Subroutine cpp_type: called CC=1 SCAR=0.0
Pod documented
22 14 my $type = $_[0]->type;
23 14 $type->base_type . $type->print_tmpl_args . ('*' x ($type->is_pointer+1))
24 }
25 1 ▶sub output_code { undef }
Subroutine output_code: called CC=1 SCAR=0.0
Pod documented
26 5 ▶sub call_parameter_code { "*( $_[1] )" }
Subroutine call_parameter_code: called CC=1 SCAR=0.0
Pod documented
27 2 ▶sub call_function_code {
Subroutine call_function_code: called CC=1 SCAR=0.0
Pod documented
28 2 my $type = $_[0]->type;
29 2 $_[2] . ' = new ' . $type->base_type . $type->print_tmpl_args . '( ' . $_[1] . " )";
30 }
31  
32 21 1;
« blib/lib/ExtUtils/XSpp/Exception/stdmessage.pm ↑ Summary blib/lib/ExtUtils/XSpp/Typemap/simple.pm »