cbor_free_common.c

filter: Statementstmt 94.4% 17 / 18 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 84.6% 22 / 26 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/CBOR/Free/X/WideCharacter.pm ↑ Summary Free.xs »
1 #include "easyxs/init.h"
2  
3 326 SV *cbf_call_scalar_with_arguments( pTHX_ SV* cb, const U8 count, SV** args ) {
4 // --- Almost all copy-paste from “perlcall” … blegh!
5 326 dSP;
6  
7 326 ENTER;
8 326 SAVETMPS;
9  
10 326 ▶ PUSHMARK(SP);
Branch: 1 branch
BranchTrueFalseTotal
PUSHMARK(SP); 0 326 326
11 326 ▶ EXTEND(SP, count);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(SP, count); 0 326 326
12  
13 U8 i;
14 936 ▶ for (i=0; i<count; i++) PUSHs( sv_2mortal(args[i]) );
Branch: 1 branch
BranchTrueFalseTotal
for (i=0; i<count; i++) PUSHs( sv_2mortal(args[i]) ); 610 326 936
15  
16 326 PUTBACK;
17  
18 326 call_sv(cb, G_SCALAR);
19  
20 100 SV *ret = newSVsv(POPs);
21  
22 100 ▶ FREETMPS;
Branch: 1 branch
BranchTrueFalseTotal
FREETMPS; 100 0 100
23 100 LEAVE;
24  
25 100 return ret;
26 }
27  
28 226 void cbf_die_with_arguments( pTHX_ U8 argslen, SV** args ) {
29 226 SV* diename = newSVpvs("CBOR::Free::_die");
30 226 sv_2mortal(diename);
31  
32 // NB: args should NOT be mortal because the call to Perl
33 // will do that for us.
34  
35 226 cbf_call_scalar_with_arguments(
36 aTHX_
37 diename,
38 argslen,
39 args
40 );
41  
42 assert(0);
43 0 }
« blib/lib/CBOR/Free/X/WideCharacter.pm ↑ Summary Free.xs »