XS.xs

filter: Statementstmt 44.4% 4 / 9 Branchbran 33.3% 4 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 38.1% 8 / 21 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
↑ Summary http_parser.c »
1  
2 #include <parser2.h>
3  
4 MODULE = HTTP::Parser2::XS PACKAGE = HTTP::Parser2::XS
5  
6  
7 int
8 parse_http_request(buf, envref)
9 SV *buf
10 SV *envref
11 CODE:
12  
13 10 ▶ if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV)
Branch: 2 branches
BranchTrueFalseTotal
if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV) 10 0 10
if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV) 0 10 10
14 0 croak("Second param for parse_http_request must be a hashref");
15
16 10 RETVAL = parse_http_request(buf, envref);
17 OUTPUT:
18 RETVAL
19  
20  
21 int
22 parse_http_response(buf, envref)
23 SV *buf
24 SV *envref
25 CODE:
26  
27 10 ▶ if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV)
Branch: 2 branches
BranchTrueFalseTotal
if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV) 10 0 10
if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV) 0 10 10
28 0 croak("Second param for parse_http_response must be a hashref");
29
30 10 RETVAL = parse_http_response(buf, envref);
31 OUTPUT:
32 RETVAL
33  
34  
35 int
36 parse_http_request_psgi(buf, envref)
37 SV *buf
38 SV *envref
39 CODE:
40  
41 0 ▶ if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV)
Branch: 2 branches
BranchTrueFalseTotal
if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV) 0 0 0
if (!SvROK(envref) || SvTYPE(SvRV(envref)) != SVt_PVHV) 0 0 0
42 0 croak("Second param for parse_http_request must be a hashref");
43
44 0 RETVAL = parse_http_request_psgi(buf, envref);
45 OUTPUT:
46 RETVAL
47  
48  
49  
50  
↑ Summary http_parser.c »