From: Nicholas Clark Date: Wed, 26 Nov 2008 20:53:23 +0000 (+0000) Subject: pad_reset() is only used in pad.c, so can be static. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=82af08ae5f1a7d2e5deb69172b40d3168c149528;p=p5sagit%2Fp5-mst-13.2.git pad_reset() is only used in pad.c, so can be static. Protect the prototype of S_vdie() with #if defined (PERL_IN_UTIL_C) p4raw-id: //depot/perl@34929 --- diff --git a/embed.fnc b/embed.fnc index 033096d..848da46 100644 --- a/embed.fnc +++ b/embed.fnc @@ -197,7 +197,9 @@ pM |void |delete_eval_scope p |void |deprecate |NN const char *const s p |void |deprecate_old |NN const char *const s Afp |OP* |die |NULLOK const char* pat|... +#if defined(PERL_IN_UTIL_C) s |OP* |vdie |NULLOK const char* pat|NULLOK va_list* args +#endif p |OP* |die_where |NULLOK const char* message|STRLEN msglen Ap |void |dounwind |I32 cxix pmb |bool |do_aexec |NULLOK SV* really|NN SV** mark|NN SV** sp @@ -669,7 +671,9 @@ pR |OP* |oopsHV |NN OP* o pd |void |pad_leavemy Apd |SV* |pad_sv |PADOFFSET po pd |void |pad_free |PADOFFSET po -pd |void |pad_reset +#if defined(PERL_IN_PAD_C) +sd |void |pad_reset +#endif pd |void |pad_swipe |PADOFFSET po|bool refadjust p |void |peep |NULLOK OP* o dopM |PerlIO*|start_glob |NN SV *tmpglob|NN IO *io diff --git a/embed.h b/embed.h index d3f45e6..81256a7 100644 --- a/embed.h +++ b/embed.h @@ -159,8 +159,12 @@ #define deprecate_old Perl_deprecate_old #endif #define die Perl_die +#if defined(PERL_IN_UTIL_C) #ifdef PERL_CORE #define vdie S_vdie +#endif +#endif +#ifdef PERL_CORE #define die_where Perl_die_where #endif #define dounwind Perl_dounwind @@ -646,7 +650,13 @@ #define pad_sv Perl_pad_sv #ifdef PERL_CORE #define pad_free Perl_pad_free -#define pad_reset Perl_pad_reset +#endif +#if defined(PERL_IN_PAD_C) +#ifdef PERL_CORE +#define pad_reset S_pad_reset +#endif +#endif +#ifdef PERL_CORE #define pad_swipe Perl_pad_swipe #define peep Perl_peep #endif @@ -2483,8 +2493,12 @@ #define deprecate(a) Perl_deprecate(aTHX_ a) #define deprecate_old(a) Perl_deprecate_old(aTHX_ a) #endif +#if defined(PERL_IN_UTIL_C) #ifdef PERL_CORE #define vdie(a,b) S_vdie(aTHX_ a,b) +#endif +#endif +#ifdef PERL_CORE #define die_where(a,b) Perl_die_where(aTHX_ a,b) #endif #define dounwind(a) Perl_dounwind(aTHX_ a) @@ -2980,7 +2994,13 @@ #define pad_sv(a) Perl_pad_sv(aTHX_ a) #ifdef PERL_CORE #define pad_free(a) Perl_pad_free(aTHX_ a) -#define pad_reset() Perl_pad_reset(aTHX) +#endif +#if defined(PERL_IN_PAD_C) +#ifdef PERL_CORE +#define pad_reset() S_pad_reset(aTHX) +#endif +#endif +#ifdef PERL_CORE #define pad_swipe(a,b) Perl_pad_swipe(aTHX_ a,b) #define peep(a) Perl_peep(aTHX_ a) #endif diff --git a/pad.c b/pad.c index fa19458..bf85118 100644 --- a/pad.c +++ b/pad.c @@ -1151,7 +1151,7 @@ Mark all the current temporaries for reuse * We avoid doing this until we can think of a Better Way. * GSAR 97-10-29 */ void -Perl_pad_reset(pTHX) +S_pad_reset(pTHX) { dVAR; #ifdef USE_BROKEN_PAD_RESET diff --git a/proto.h b/proto.h index 1517baa..14dc4f1 100644 --- a/proto.h +++ b/proto.h @@ -538,7 +538,9 @@ PERL_CALLCONV void Perl_deprecate_old(pTHX_ const char *const s) PERL_CALLCONV OP* Perl_die(pTHX_ const char* pat, ...) __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2); +#if defined(PERL_IN_UTIL_C) STATIC OP* S_vdie(pTHX_ const char* pat, va_list* args); +#endif PERL_CALLCONV OP* Perl_die_where(pTHX_ const char* message, STRLEN msglen); PERL_CALLCONV void Perl_dounwind(pTHX_ I32 cxix); /* PERL_CALLCONV bool Perl_do_aexec(pTHX_ SV* really, SV** mark, SV** sp) @@ -2383,7 +2385,9 @@ PERL_CALLCONV OP* Perl_oopsHV(pTHX_ OP* o) PERL_CALLCONV void Perl_pad_leavemy(pTHX); PERL_CALLCONV SV* Perl_pad_sv(pTHX_ PADOFFSET po); PERL_CALLCONV void Perl_pad_free(pTHX_ PADOFFSET po); -PERL_CALLCONV void Perl_pad_reset(pTHX); +#if defined(PERL_IN_PAD_C) +STATIC void S_pad_reset(pTHX); +#endif PERL_CALLCONV void Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust); PERL_CALLCONV void Perl_peep(pTHX_ OP* o); PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV *tmpglob, IO *io)