summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-11-26 23:02:47 +0000
committerNicholas Clark <nick@ccl4.org>2008-11-26 23:02:47 +0000
commitd2bd4e7f98213965c3bc8845749b1ba217cd7a27 (patch)
treef4496fb59919d28f39dbc58fbe1b59ab399abdd9
parentb429380fd7d54c14783866916eff039809949692 (diff)
downloadperl-d2bd4e7f98213965c3bc8845749b1ba217cd7a27.tar.gz
sv_add_arena() is now only called from sv.c, so it can be static.
p4raw-id: //depot/perl@34938
-rw-r--r--embed.fnc5
-rw-r--r--embed.h8
-rw-r--r--proto.h4
-rw-r--r--sv.c4
4 files changed, 15 insertions, 6 deletions
diff --git a/embed.fnc b/embed.fnc
index 68cbe327da..41fa2a198f 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 7fbec386c2..c227492996 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 f9f996d8fe..3148a832cd 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 efa347b9c6..2db30bef1c 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);