line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* vi: set ft=c : */ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
// TODO: move av_push_from_av() from perl-additions.c.inc to here |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
#define XPUSHs_from_AV(av) \ |
6
|
|
|
|
|
|
|
do { \ |
7
|
|
|
|
|
|
|
EXTEND(SP, AvFILL(av)+1); \ |
8
|
|
|
|
|
|
|
size_t i; \ |
9
|
|
|
|
|
|
|
for(i = 0; i < AvFILL(av)+1; i++) \ |
10
|
|
|
|
|
|
|
PUSHs(AvARRAY(av)[i]); \ |
11
|
|
|
|
|
|
|
} while(0) |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#define av_push_svn(av, svp, n) S_av_push_svn(aTHX_ av, svp, n) |
14
|
0
|
|
|
|
|
|
static void S_av_push_svn(pTHX_ AV *av, SV **svp, size_t n) |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
0
|
|
|
|
|
while(n) { |
17
|
0
|
|
|
|
|
|
av_push(av, newSVsv(*svp)); |
18
|
0
|
|
|
|
|
|
svp++; n--; |
19
|
|
|
|
|
|
|
} |
20
|
0
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#define newAV_svn_dup(svp, n) S_newAV_svn_dup(aTHX_ svp, n) |
23
|
0
|
|
|
|
|
|
static AV *S_newAV_svn_dup(pTHX_ SV **svp, size_t n) |
24
|
|
|
|
|
|
|
{ |
25
|
0
|
|
|
|
|
|
AV *av = newAV(); |
26
|
0
|
|
|
|
|
|
av_push_svn(av, svp, n); |
27
|
0
|
|
|
|
|
|
return av; |
28
|
|
|
|
|
|
|
} |