xs/abi.xs

filter: Statementstmt 100% 9 / 9 Branchbran 50.0% 6 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 71.4% 15 / 21 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« include/hamt/hamt_abi_selftest.h ↑ Summary include/hamt/hamt_map.h »
1 # The C ABI's Perl-visible ends: the table's address, its version, and the
2 # selftest that walks it.
3  
4 MODULE = HAMT PACKAGE = HAMT
5  
6 # Unsigned, not IV: where the loader maps this object decides the sign bit, and
7 # a 32-bit perl above 0x7fffffff would hand back a negative from PTR2IV.
8 UV
9 _abi_ptr()
10 CODE:
11 4 ▶ RETVAL = PTR2UV(&HAMT_ABI);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = PTR2UV(&HAMT_ABI); 0 4 4
12 OUTPUT:
13 RETVAL
14  
15 IV
16 _abi_version()
17 CODE:
18 2 ▶ RETVAL = HAMT_ABI.abi_version;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = HAMT_ABI.abi_version; 0 2 2
19 OUTPUT:
20 RETVAL
21  
22 # The number of the check that failed, or 0, and then a map, a set and a
23 # vector that were built in C through the table, for the Perl surface to
24 # read back. A negative number is a check that failed AND left something
25 # allocated behind it.
26 void
27 _abi_selftest()
28 PREINIT:
29 7 SV *map = NULL, *set = NULL, *vec = NULL;
30 int step;
31 PPCODE:
32 7 step = hamt_abi_selftest(aTHX_ &map, &set, &vec);
33 7 ▶ EXTEND(SP, 4);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(SP, 4); 0 7 7
34 7 PUSHs(sv_2mortal(newSViv(step)));
35 7 ▶ PUSHs(map ? sv_2mortal(map) : &PL_sv_undef);
Branch: 1 branch
BranchTrueFalseTotal
PUSHs(map ? sv_2mortal(map) : &PL_sv_undef); 7 0 7
36 7 ▶ PUSHs(set ? sv_2mortal(set) : &PL_sv_undef);
Branch: 1 branch
BranchTrueFalseTotal
PUSHs(set ? sv_2mortal(set) : &PL_sv_undef); 7 0 7
37 7 ▶ PUSHs(vec ? sv_2mortal(vec) : &PL_sv_undef);
Branch: 1 branch
BranchTrueFalseTotal
PUSHs(vec ? sv_2mortal(vec) : &PL_sv_undef); 7 0 7
« include/hamt/hamt_abi_selftest.h ↑ Summary include/hamt/hamt_map.h »