XS.xs

filter: Statementstmt 100% 5 / 5 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 9 / 9 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« const-xs.inc ↑ Summary blib/lib/PerlX/ArraySkip/XS.pm »
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4  
5 #include "ppport.h"
6  
7 #include "const-c.inc"
8  
9 #define sv_defined(sv) (sv && (SvIOK(sv) || SvNOK(sv) || SvPOK(sv) || SvROK(sv)))
10  
11 MODULE = PerlX::ArraySkip::XS PACKAGE = PerlX::ArraySkip::XS
12  
13 INCLUDE: const-xs.inc
14  
15 void
16 arrayskip (...)
17 PROTOTYPE: @
18 PPCODE:
19 {
20 int i;
21
22 6 ▶ if (items == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (items == 0) 1 5 6
23 {
24 1 XSRETURN(0);
25 }
26
27 26 ▶ for (i = 1; i <= items; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (i = 1; i <= items; i++) 21 5 26
28 {
29 21 PUSHs(ST(i));
30 }
31
32 5 XSRETURN(items - 1);
33 }
34  
« const-xs.inc ↑ Summary blib/lib/PerlX/ArraySkip/XS.pm »