From: Nicholas Clark Date: Thu, 27 Nov 2008 10:10:06 +0000 (+0000) Subject: av_fake() isn't in the public API, and isn't used anywhere, so it can X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd34071197163d908b881c4204226b13ed4bb6b0;p=p5sagit%2Fp5-mst-13.2.git av_fake() isn't in the public API, and isn't used anywhere, so it can go. p4raw-id: //depot/perl@34944 --- diff --git a/embed.fnc b/embed.fnc index df4748d..bda81cd 100644 --- a/embed.fnc +++ b/embed.fnc @@ -112,7 +112,6 @@ Apd |void |av_clear |NN AV *av Apd |SV* |av_delete |NN AV *av|I32 key|I32 flags ApdR |bool |av_exists |NN AV *av|I32 key Apd |void |av_extend |NN AV *av|I32 key -pR |AV* |av_fake |I32 size|NN SV **strp ApdR |SV** |av_fetch |NN AV *av|I32 key|I32 lval Apd |void |av_fill |NN AV *av|I32 fill ApdR |I32 |av_len |NN AV *av diff --git a/embed.h b/embed.h index 9b31ff7..480652b 100644 --- a/embed.h +++ b/embed.h @@ -56,9 +56,6 @@ #define av_delete Perl_av_delete #define av_exists Perl_av_exists #define av_extend Perl_av_extend -#ifdef PERL_CORE -#define av_fake Perl_av_fake -#endif #define av_fetch Perl_av_fetch #define av_fill Perl_av_fill #define av_len Perl_av_len @@ -2416,9 +2413,6 @@ #define av_delete(a,b,c) Perl_av_delete(aTHX_ a,b,c) #define av_exists(a,b) Perl_av_exists(aTHX_ a,b) #define av_extend(a,b) Perl_av_extend(aTHX_ a,b) -#ifdef PERL_CORE -#define av_fake(a,b) Perl_av_fake(aTHX_ a,b) -#endif #define av_fetch(a,b,c) Perl_av_fetch(aTHX_ a,b,c) #define av_fill(a,b) Perl_av_fill(aTHX_ a,b) #define av_len(a) Perl_av_len(aTHX_ a) diff --git a/mathoms.c b/mathoms.c index 179c608..2b765b8 100644 --- a/mathoms.c +++ b/mathoms.c @@ -607,29 +607,6 @@ Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) sv_magic(MUTABLE_SV(hv), MUTABLE_SV(gv), how, NULL, 0); } -AV * -Perl_av_fake(pTHX_ register I32 size, register SV **strp) -{ - register SV** ary; - register AV * const av = MUTABLE_AV(newSV_type(SVt_PVAV)); - - PERL_ARGS_ASSERT_AV_FAKE; - - Newx(ary,size+1,SV*); - AvALLOC(av) = ary; - Copy(strp,ary,size,SV*); - AvREIFY_only(av); - AvARRAY(av) = ary; - AvFILLp(av) = size - 1; - AvMAX(av) = size - 1; - while (size--) { - assert (*strp); - SvTEMP_off(*strp); - strp++; - } - return av; -} - bool Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp) diff --git a/proto.h b/proto.h index 91dde2e..a2c99a2 100644 --- a/proto.h +++ b/proto.h @@ -175,12 +175,6 @@ PERL_CALLCONV void Perl_av_extend(pTHX_ AV *av, I32 key) #define PERL_ARGS_ASSERT_AV_EXTEND \ assert(av) -PERL_CALLCONV AV* Perl_av_fake(pTHX_ I32 size, SV **strp) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_2); -#define PERL_ARGS_ASSERT_AV_FAKE \ - assert(strp) - PERL_CALLCONV SV** Perl_av_fetch(pTHX_ AV *av, I32 key, I32 lval) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1);