xs/ResponseParser.xsi

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 66 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 89 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/Response.xsi ↑ Summary xs/main_xsgen.cc »
1 MODULE = Protocol::HTTP PACKAGE = Protocol::HTTP::ResponseParser
2 PROTOTYPES: DISABLE
3  
4 0 ResponseParser* ResponseParser::new ()
5 0 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
0 0 0
6 0 ▶RequestSP ResponseParser::context_request ()
Branch: 4 branches
BranchTrueFalseTotal
RequestSP ResponseParser::context_request () 0 0 0
RequestSP ResponseParser::context_request () 0 0 0
RequestSP ResponseParser::context_request () 0 0 0
RequestSP ResponseParser::context_request () 0 0 0
7 0  
8 0 ▶void ResponseParser::set_context_request (Request* req)
Branch: 1 branch
BranchTrueFalseTotal
void ResponseParser::set_context_request (Request* req) 0 0 0
9  
10 void ResponseParser::parse (const string& buf) : ALIAS(parse_shift=1) {
11 0 ▶ if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed
Branch: 3 branches
BranchTrueFalseTotal
if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed 0 0 0
if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed 0 0 0
if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed 0 0 0
12 0 ▶ auto result = THIS->parse(buf);
Branch: 1 branch
BranchTrueFalseTotal
auto result = THIS->parse(buf); 0 0 0
13 0 SV* bufsv = ST(1);
14 0 ▶ EXTEND(SP, 4);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(SP, 4); 0 0 0
EXTEND(SP, 4); 0 0 0
15
16 0 ▶ mPUSHs(xs::out(result.response).detach());
Branch: 2 branches
BranchTrueFalseTotal
mPUSHs(xs::out(result.response).detach()); 0 0 0
mPUSHs(xs::out(result.response).detach()); 0 0 0
17 0 ▶ mPUSHs(xs::out(result.state).detach());
Branch: 2 branches
BranchTrueFalseTotal
mPUSHs(xs::out(result.state).detach()); 0 0 0
mPUSHs(xs::out(result.state).detach()); 0 0 0
18
19 0 ▶ if (ix) sv_insert(bufsv, 0, result.position, "", 0);
Branch: 2 branches
BranchTrueFalseTotal
if (ix) sv_insert(bufsv, 0, result.position, "", 0); 0 0 0
if (ix) sv_insert(bufsv, 0, result.position, "", 0); 0 0 0
20 0 ▶ else mPUSHu(result.position);
Branch: 2 branches
BranchTrueFalseTotal
else mPUSHu(result.position); 0 0 0
else mPUSHu(result.position); 0 0 0
21
22 0 ▶ if (result.error) mPUSHs(xs::out(result.error).detach());
Branch: 3 branches
BranchTrueFalseTotal
if (result.error) mPUSHs(xs::out(result.error).detach()); 0 0 0
if (result.error) mPUSHs(xs::out(result.error).detach()); 0 0 0
if (result.error) mPUSHs(xs::out(result.error).detach()); 0 0 0
23 }
24  
25 void ResponseParser::eof () {
26 0 ▶ auto result = THIS->eof();
Branch: 1 branch
BranchTrueFalseTotal
auto result = THIS->eof(); 0 0 0
27 0 ▶ EXTEND(SP, 3);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(SP, 3); 0 0 0
EXTEND(SP, 3); 0 0 0
28
29 0 ▶ mPUSHs(xs::out(result.response).detach());
Branch: 2 branches
BranchTrueFalseTotal
mPUSHs(xs::out(result.response).detach()); 0 0 0
mPUSHs(xs::out(result.response).detach()); 0 0 0
30 0 ▶ mPUSHs(xs::out(result.state).detach());
Branch: 2 branches
BranchTrueFalseTotal
mPUSHs(xs::out(result.state).detach()); 0 0 0
mPUSHs(xs::out(result.state).detach()); 0 0 0
31
32 0 ▶ if (result.error) {
Branch: 1 branch
BranchTrueFalseTotal
if (result.error) { 0 0 0
33 0 PUSHs(&PL_sv_undef);
34 0 ▶ mPUSHs(xs::out(result.error).detach());
Branch: 2 branches
BranchTrueFalseTotal
mPUSHs(xs::out(result.error).detach()); 0 0 0
mPUSHs(xs::out(result.error).detach()); 0 0 0
35 }
36 }
37  
38 0 void ResponseParser::reset ()
39  
40 SV* CLONE_SKIP (...) {
41 0 XSRETURN_YES;
42 PERL_UNUSED_VAR(items);
43 }
« xs/Response.xsi ↑ Summary xs/main_xsgen.cc »