xs/cloning.xsi

filter: Statementstmt 68.7% 11 / 16 Branchbran 35.0% 14 / 40 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 44.6% 25 / 56 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/arch/URI/XS.pm ↑ Summary xs/main.xs »
1 MODULE = URI::XS PACKAGE = URI::XS
2 PROTOTYPES: DISABLE
3  
4 URISP URI::HOOK_CLONE () {
5 0 PROTO = Object(ST(0)).stash();
6 0 ▶ if (dynamic_cast<URIStrict*>(THIS)) RETVAL = URI::create(*THIS);
Branch: 2 branches
BranchTrueFalseTotal
if (dynamic_cast<URIStrict*>(THIS)) RETVAL = URI::create(*THIS); 0 0 0
if (dynamic_cast<URIStrict*>(THIS)) RETVAL = URI::create(*THIS); 0 0 0
7 0 ▶ else RETVAL = make_backref<URI>(*THIS);
Branch: 3 branches
BranchTrueFalseTotal
else RETVAL = make_backref<URI>(*THIS); 0 0 0
else RETVAL = make_backref<URI>(*THIS); 0 0 0
else RETVAL = make_backref<URI>(*THIS); 0 0 0
8 0 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
9  
10 string URI::STORABLE_freeze (bool) {
11 3 ▶ RETVAL = THIS->to_string();
Branch: 2 branches
BranchTrueFalseTotal
RETVAL = THIS->to_string(); 3 0 3
RETVAL = THIS->to_string(); 3 0 3
12 3 ▶ if (dynamic_cast<URIStrict*>(THIS)) RETVAL += '1';
Branch: 3 branches
BranchTrueFalseTotal
if (dynamic_cast<URIStrict*>(THIS)) RETVAL += '1'; 3 0 3
if (dynamic_cast<URIStrict*>(THIS)) RETVAL += '1'; 2 1 3
if (dynamic_cast<URIStrict*>(THIS)) RETVAL += '1'; 2 0 2
13 1 ▶ else RETVAL += '0';
Branch: 1 branch
BranchTrueFalseTotal
else RETVAL += '0'; 1 0 1
14 }
15  
16 URISP STORABLE_attach (SV* CLASS, bool, SV* serialized) {
17 3 STRLEN len;
18 char* p = SvPV(serialized, len);
19 3 len--;
20 3 char ctrl = p[len];
21 3 p[len] = 0;
22 3 if (ctrl == '1') RETVAL = URI::create(string(p, len));
23 3 ▶ else RETVAL = make_backref<URI>(string(p, len));
Branch: 3 branches
BranchTrueFalseTotal
else RETVAL = make_backref<URI>(string(p, len)); 2 1 3
else RETVAL = make_backref<URI>(string(p, len)); 2 0 2
else RETVAL = make_backref<URI>(string(p, len)); 2 0 2
24 1 ▶ PROTO = CLASS;
Branch: 2 branches
BranchTrueFalseTotal
PROTO = CLASS; 1 0 1
PROTO = CLASS; 1 0 1
25 3 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 3 0 3
26  
27 string URI::TO_JSON () {
28 0 ▶ RETVAL = THIS->to_string();
Branch: 2 branches
BranchTrueFalseTotal
RETVAL = THIS->to_string(); 0 0 0
RETVAL = THIS->to_string(); 0 0 0
29 }
« blib/arch/URI/XS.pm ↑ Summary xs/main.xs »