xs/abi.xs

filter: Statementstmt 100% 8 / 8 Branchbran 50.0% 4 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 75.0% 12 / 16 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« include/tkr/tkr_abi_selftest.h ↑ Summary xs/abi_in.xs »
1 # The C ABI's Perl-visible ends: the table's address, its version, and the
2 # self-test that calls every entry as a consumer would.
3  
4 MODULE = Time::Keeper::Recurrence PACKAGE = Time::Keeper::Recurrence
5  
6 # Unsigned, not IV: a 32-bit perl may map the table above 0x7fffffff.
7 UV
8 _abi_ptr()
9 CODE:
10 2 ▶ RETVAL = PTR2UV(&TKR_ABI);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = PTR2UV(&TKR_ABI); 0 2 2
11 OUTPUT:
12 RETVAL
13  
14 IV
15 _abi_version()
16 CODE:
17 1 ▶ RETVAL = TKR_ABI.abi_version;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = TKR_ABI.abi_version; 0 1 1
18 OUTPUT:
19 RETVAL
20  
21 void
22 _abi_selftest(ptr)
23 UV ptr
24 PREINIT:
25 1 SV *made = NULL;
26 int step;
27 PPCODE:
28 1 step = tkr_abi_selftest(aTHX_ INT2PTR(const time_keeper_recurrence_abi *, ptr), &made);
29 1 SP = PL_stack_base + ax - 1;
30 1 ▶ EXTEND(SP, 2);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(SP, 2); 0 1 1
31 1 PUSHs(sv_2mortal(newSViv(step)));
32 1 ▶ PUSHs(made ? sv_2mortal(made) : &PL_sv_undef);
Branch: 1 branch
BranchTrueFalseTotal
PUSHs(made ? sv_2mortal(made) : &PL_sv_undef); 1 0 1
« include/tkr/tkr_abi_selftest.h ↑ Summary xs/abi_in.xs »