xs/encode.xsi

filter: Statementstmt 100% 10 / 10 Branchbran 57.1% 8 / 14 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 75.0% 18 / 24 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/schemas.xsi ↑ Summary blib/arch/URI/XS.x/info »
1 MODULE = URI::XS PACKAGE = URI::XS
2 PROTOTYPES: DISABLE
3  
4 SV* encode_uri_component (string_view input, bool plus = false) : ALIAS(encodeURIComponent=1) {
5 4 ▶ RETVAL = newSV(input.length()*3 + 1);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = newSV(input.length()*3 + 1); 4 0 4
6 4 SvPOK_on(RETVAL);
7 4 ▶ size_t rlen = encode_uri_component(input, SvPVX(RETVAL), plus ? URIComponent::query_param_plus : URIComponent::query_param);
Branch: 2 branches
BranchTrueFalseTotal
size_t rlen = encode_uri_component(input, SvPVX(RETVAL), plus ? URIComponent::query_param_plus : URIComponent::query_param); 1 3 4
size_t rlen = encode_uri_component(input, SvPVX(RETVAL), plus ? URIComponent::query_param_plus : URIComponent::query_param); 4 0 4
8 4 SvPVX(RETVAL)[rlen] = 0;
9 4 ▶ SvCUR_set(RETVAL, rlen);
Branch: 1 branch
BranchTrueFalseTotal
SvCUR_set(RETVAL, rlen); 4 0 4
10 PERL_UNUSED_VAR(ix);
11 }
12  
13 SV* decode_uri_component (string_view input) : ALIAS(decodeURIComponent=1) {
14 4 ▶ RETVAL = newSV(input.length()+1);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = newSV(input.length()+1); 4 0 4
15 4 SvPOK_on(RETVAL);
16 4 ▶ size_t rlen = decode_uri_component(input, SvPVX(RETVAL));
Branch: 1 branch
BranchTrueFalseTotal
size_t rlen = decode_uri_component(input, SvPVX(RETVAL)); 4 0 4
17 4 SvPVX(RETVAL)[rlen] = 0;
18 4 ▶ SvCUR_set(RETVAL, rlen);
Branch: 1 branch
BranchTrueFalseTotal
SvCUR_set(RETVAL, rlen); 4 0 4
19 PERL_UNUSED_VAR(ix);
20 }
« xs/schemas.xsi ↑ Summary blib/arch/URI/XS.x/info »