diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-10-29 11:36:26 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2005-10-29 11:36:26 +0000 |
commit | b966a8126159ca0abbcdfaef42a884132eb8c589 (patch) | |
tree | aa76127a8951b1479cd90c4ecbde51a5bbd14043 /mathoms.c | |
parent | 2674aeec9d4106f3928d3c8b88be7bc9e6f8eff1 (diff) | |
download | perl-b966a8126159ca0abbcdfaef42a884132eb8c589.tar.gz |
Coverage stats say av_fake() is a mathom too.
p4raw-id: //depot/perl@25872
Diffstat (limited to 'mathoms.c')
-rw-r--r-- | mathoms.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -317,6 +317,28 @@ Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix) gv_efullname4(sv, gv, prefix, TRUE); } +AV * +Perl_av_fake(pTHX_ register I32 size, register SV **strp) +{ + register SV** ary; + register AV * const av = (AV*)NEWSV(9,0); + + sv_upgrade((SV *)av, SVt_PVAV); + Newx(ary,size+1,SV*); + AvALLOC(av) = ary; + Copy(strp,ary,size,SV*); + AvREIFY_only(av); + SvPV_set(av, (char*)ary); + AvFILLp(av) = size - 1; + AvMAX(av) = size - 1; + while (size--) { + assert (*strp); + SvTEMP_off(*strp); + strp++; + } + return av; +} + /* * Local variables: * c-indentation-style: bsd |