xs/Cert/HostKey.xs

filter: Statementstmt 7.4% 2 / 27 Branchbran 0.0% 0 / 22 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 4.0% 2 / 49 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« const-c-category.inc ↑ Summary deps/libgit2/src/libgit2/streams/registry.c »
1 MODULE = Git::Raw PACKAGE = Git::Raw::Cert::HostKey
2  
3 BOOT:
4 {
5 87 AV *isa = get_av("Git::Raw::Cert::HostKey::ISA", 1);
6 87 av_push(isa, newSVpv("Git::Raw::Cert", 0));
7 }
8  
9 void
10 ssh_types(self)
11 Cert_HostKey self
12  
13 PREINIT:
14 int ctx;
15  
16 git_cert_ssh_t type;
17  
18 PPCODE:
19 0 ctx = GIMME_V;
20  
21 0 ▶ if (ctx != G_VOID) {
Branch: 1 branch
BranchTrueFalseTotal
if (ctx != G_VOID) { 0 0 0
22 0 int count = 0;
23  
24 0 type = self -> type;
25  
26 0 ▶ if (type & GIT_CERT_SSH_MD5) {
Branch: 1 branch
BranchTrueFalseTotal
if (type & GIT_CERT_SSH_MD5) { 0 0 0
27 0 ▶ if (ctx == G_ARRAY)
Branch: 1 branch
BranchTrueFalseTotal
if (ctx == G_ARRAY) 0 0 0
28 0 ▶ mXPUSHs(newSVpv("md5", 0));
Branch: 1 branch
BranchTrueFalseTotal
mXPUSHs(newSVpv("md5", 0)); 0 0 0
29 0 count++;
30 }
31  
32 0 ▶ if (type & GIT_CERT_SSH_SHA1) {
Branch: 1 branch
BranchTrueFalseTotal
if (type & GIT_CERT_SSH_SHA1) { 0 0 0
33 0 ▶ if (ctx == G_ARRAY)
Branch: 1 branch
BranchTrueFalseTotal
if (ctx == G_ARRAY) 0 0 0
34 0 ▶ mXPUSHs(newSVpv("sha1", 0));
Branch: 1 branch
BranchTrueFalseTotal
mXPUSHs(newSVpv("sha1", 0)); 0 0 0
35 0 count++;
36 }
37  
38 0 ▶ if (ctx == G_ARRAY)
Branch: 1 branch
BranchTrueFalseTotal
if (ctx == G_ARRAY) 0 0 0
39 0 XSRETURN(count);
40 else {
41 0 ▶ mXPUSHs(newSViv(count));
Branch: 1 branch
BranchTrueFalseTotal
mXPUSHs(newSViv(count)); 0 0 0
42 0 XSRETURN(1);
43 }
44 } else
45 0 XSRETURN_EMPTY;
46  
47 SV *
48 sha1(self)
49 Cert_HostKey self
50  
51 PREINIT:
52 git_cert_ssh_t type;
53  
54 CODE:
55 0 type = self -> type;
56  
57 0 RETVAL = &PL_sv_undef;
58 0 ▶ if (type & GIT_CERT_SSH_SHA1)
Branch: 1 branch
BranchTrueFalseTotal
if (type & GIT_CERT_SSH_SHA1) 0 0 0
59 0 RETVAL = newSVpv((const char *) &self -> hash_sha1[0], 20);
60  
61 OUTPUT: RETVAL
62  
63 SV *
64 md5(self)
65 Cert_HostKey self
66  
67 PREINIT:
68 git_cert_ssh_t type;
69  
70 CODE:
71 0 type = self -> type;
72  
73 0 RETVAL = &PL_sv_undef;
74 0 ▶ if (type & GIT_CERT_SSH_MD5)
Branch: 1 branch
BranchTrueFalseTotal
if (type & GIT_CERT_SSH_MD5) 0 0 0
75 0 RETVAL = newSVpv((const char *) &self -> hash_md5[0], 16);
76  
77 OUTPUT: RETVAL
« const-c-category.inc ↑ Summary deps/libgit2/src/libgit2/streams/registry.c »