From: Steve Peters Date: Sat, 29 Oct 2005 11:36:26 +0000 (+0000) Subject: Coverage stats say av_fake() is a mathom too. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b966a8126159ca0abbcdfaef42a884132eb8c589;p=p5sagit%2Fp5-mst-13.2.git Coverage stats say av_fake() is a mathom too. p4raw-id: //depot/perl@25872 --- diff --git a/av.c b/av.c index c71dd03..df35b1a 100644 --- a/av.c +++ b/av.c @@ -398,28 +398,6 @@ Perl_av_make(pTHX_ register I32 size, register SV **strp) return av; } -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; -} - /* =for apidoc av_clear diff --git a/mathoms.c b/mathoms.c index 3d9105f..09eb351 100644 --- a/mathoms.c +++ b/mathoms.c @@ -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