line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "easyxs/init.h" |
2
|
|
|
|
|
|
|
|
3
|
318
|
|
|
|
|
|
SV *cbf_call_scalar_with_arguments( pTHX_ SV* cb, const U8 count, SV** args ) { |
4
|
|
|
|
|
|
|
// --- Almost all copy-paste from “perlcall” … blegh! |
5
|
318
|
|
|
|
|
|
dSP; |
6
|
|
|
|
|
|
|
|
7
|
318
|
|
|
|
|
|
ENTER; |
8
|
318
|
|
|
|
|
|
SAVETMPS; |
9
|
|
|
|
|
|
|
|
10
|
318
|
50
|
|
|
|
|
PUSHMARK(SP); |
11
|
318
|
50
|
|
|
|
|
EXTEND(SP, count); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
U8 i; |
14
|
912
|
100
|
|
|
|
|
for (i=0; i
|
15
|
|
|
|
|
|
|
|
16
|
318
|
|
|
|
|
|
PUTBACK; |
17
|
|
|
|
|
|
|
|
18
|
318
|
|
|
|
|
|
call_sv(cb, G_SCALAR); |
19
|
|
|
|
|
|
|
|
20
|
100
|
|
|
|
|
|
SV *ret = newSVsv(POPs); |
21
|
|
|
|
|
|
|
|
22
|
100
|
50
|
|
|
|
|
FREETMPS; |
23
|
100
|
|
|
|
|
|
LEAVE; |
24
|
|
|
|
|
|
|
|
25
|
100
|
|
|
|
|
|
return ret; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
218
|
|
|
|
|
|
void cbf_die_with_arguments( pTHX_ U8 argslen, SV** args ) { |
29
|
218
|
|
|
|
|
|
SV* diename = newSVpvs("CBOR::Free::_die"); |
30
|
218
|
|
|
|
|
|
sv_2mortal(diename); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
// NB: args should NOT be mortal because the call to Perl |
33
|
|
|
|
|
|
|
// will do that for us. |
34
|
|
|
|
|
|
|
|
35
|
218
|
|
|
|
|
|
cbf_call_scalar_with_arguments( |
36
|
|
|
|
|
|
|
aTHX_ |
37
|
|
|
|
|
|
|
diename, |
38
|
|
|
|
|
|
|
argslen, |
39
|
|
|
|
|
|
|
args |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
assert(0); |
43
|
0
|
|
|
|
|
|
} |