From: Nicholas Clark Date: Wed, 26 Nov 2008 23:02:47 +0000 (+0000) Subject: sv_add_arena() is now only called from sv.c, so it can be static. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2bd4e7f98213965c3bc8845749b1ba217cd7a27;p=p5sagit%2Fp5-mst-13.2.git sv_add_arena() is now only called from sv.c, so it can be static. p4raw-id: //depot/perl@34938 --- diff --git a/embed.fnc b/embed.fnc index 68cbe32..41fa2a1 100644 --- a/embed.fnc +++ b/embed.fnc @@ -881,7 +881,10 @@ Apd |char* |sv_pvn |NN SV *sv|NN STRLEN *lp Apd |char* |sv_pvutf8n |NN SV *sv|NN STRLEN *lp Apd |char* |sv_pvbyten |NN SV *sv|NN STRLEN *lp Apd |I32 |sv_true |NULLOK SV *const sv -pd |void |sv_add_arena |NN char *const ptr|const U32 size|const U32 flags +#if defined (PERL_IN_SV_C) +sd |void |sv_add_arena |NN char *const ptr|const U32 size \ + |const U32 flags +#endif Apd |int |sv_backoff |NN SV *const sv Apd |SV* |sv_bless |NN SV *const sv|NN HV *const stash Afpd |void |sv_catpvf |NN SV *const sv|NN const char *const pat|... diff --git a/embed.h b/embed.h index 7fbec38..c227492 100644 --- a/embed.h +++ b/embed.h @@ -888,8 +888,10 @@ #define sv_pvutf8n Perl_sv_pvutf8n #define sv_pvbyten Perl_sv_pvbyten #define sv_true Perl_sv_true +#if defined (PERL_IN_SV_C) #ifdef PERL_CORE -#define sv_add_arena Perl_sv_add_arena +#define sv_add_arena S_sv_add_arena +#endif #endif #define sv_backoff Perl_sv_backoff #define sv_bless Perl_sv_bless @@ -3233,8 +3235,10 @@ #define sv_pvutf8n(a,b) Perl_sv_pvutf8n(aTHX_ a,b) #define sv_pvbyten(a,b) Perl_sv_pvbyten(aTHX_ a,b) #define sv_true(a) Perl_sv_true(aTHX_ a) +#if defined (PERL_IN_SV_C) #ifdef PERL_CORE -#define sv_add_arena(a,b,c) Perl_sv_add_arena(aTHX_ a,b,c) +#define sv_add_arena(a,b,c) S_sv_add_arena(aTHX_ a,b,c) +#endif #endif #define sv_backoff(a) Perl_sv_backoff(aTHX_ a) #define sv_bless(a,b) Perl_sv_bless(aTHX_ a,b) diff --git a/proto.h b/proto.h index f9f996d..3148a83 100644 --- a/proto.h +++ b/proto.h @@ -3083,11 +3083,13 @@ PERL_CALLCONV char* Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp) assert(sv); assert(lp) PERL_CALLCONV I32 Perl_sv_true(pTHX_ SV *const sv); -PERL_CALLCONV void Perl_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) +#if defined (PERL_IN_SV_C) +STATIC void S_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SV_ADD_ARENA \ assert(ptr) +#endif PERL_CALLCONV int Perl_sv_backoff(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SV_BACKOFF \ diff --git a/sv.c b/sv.c index efa347b..2db30be 100644 --- a/sv.c +++ b/sv.c @@ -380,8 +380,8 @@ and split it into a list of free SVs. =cut */ -void -Perl_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) +static void +S_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) { dVAR; SV *const sva = MUTABLE_SV(ptr);