From: Nicholas Clark Date: Wed, 12 Sep 2007 00:09:18 +0000 (+0000) Subject: mro_get_linear_isa_dfs and mro_get_linear_isa_c3 can have static X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4befac30287793f3de4eeec4608be8e6a4c07763;p=p5sagit%2Fp5-mst-13.2.git mro_get_linear_isa_dfs and mro_get_linear_isa_c3 can have static linkage. p4raw-id: //depot/perl@31849 --- diff --git a/embed.fnc b/embed.fnc index efd9242..395bd4d 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1880,8 +1880,10 @@ p |struct mro_meta* |mro_meta_init |NN HV* stash p |struct mro_meta* |mro_meta_dup |NN struct mro_meta* smeta|NN CLONE_PARAMS* param #endif Apd |AV* |mro_get_linear_isa|NN HV* stash -Apd |AV* |mro_get_linear_isa_c3|NN HV* stash|I32 level -Apd |AV* |mro_get_linear_isa_dfs|NN HV* stash|I32 level +#if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT) +sd |AV* |mro_get_linear_isa_c3|NN HV* stash|I32 level +sd |AV* |mro_get_linear_isa_dfs|NN HV* stash|I32 level +#endif pd |void |mro_isa_changed_in|NN HV* stash Apd |void |mro_method_changed_in |NN HV* stash p |void |boot_core_mro diff --git a/embed.h b/embed.h index 029d29d..6aaaf8a 100644 --- a/embed.h +++ b/embed.h @@ -1911,8 +1911,12 @@ #endif #endif #define mro_get_linear_isa Perl_mro_get_linear_isa -#define mro_get_linear_isa_c3 Perl_mro_get_linear_isa_c3 -#define mro_get_linear_isa_dfs Perl_mro_get_linear_isa_dfs +#if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT) +#ifdef PERL_CORE +#define mro_get_linear_isa_c3 S_mro_get_linear_isa_c3 +#define mro_get_linear_isa_dfs S_mro_get_linear_isa_dfs +#endif +#endif #ifdef PERL_CORE #define mro_isa_changed_in Perl_mro_isa_changed_in #endif @@ -4207,8 +4211,12 @@ #endif #endif #define mro_get_linear_isa(a) Perl_mro_get_linear_isa(aTHX_ a) -#define mro_get_linear_isa_c3(a,b) Perl_mro_get_linear_isa_c3(aTHX_ a,b) -#define mro_get_linear_isa_dfs(a,b) Perl_mro_get_linear_isa_dfs(aTHX_ a,b) +#if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT) +#ifdef PERL_CORE +#define mro_get_linear_isa_c3(a,b) S_mro_get_linear_isa_c3(aTHX_ a,b) +#define mro_get_linear_isa_dfs(a,b) S_mro_get_linear_isa_dfs(aTHX_ a,b) +#endif +#endif #ifdef PERL_CORE #define mro_isa_changed_in(a) Perl_mro_isa_changed_in(aTHX_ a) #endif diff --git a/global.sym b/global.sym index 7b0a18b..fa18d27 100644 --- a/global.sym +++ b/global.sym @@ -761,7 +761,5 @@ Perl_signbit Perl_emulate_cop_io Perl_get_re_arg Perl_mro_get_linear_isa -Perl_mro_get_linear_isa_c3 -Perl_mro_get_linear_isa_dfs Perl_mro_method_changed_in # ex: set ro: diff --git a/mro.c b/mro.c index 80f11db..8634ccb 100644 --- a/mro.c +++ b/mro.c @@ -21,6 +21,7 @@ These functions are related to the method resolution order of perl classes */ #include "EXTERN.h" +#define PERL_IN_MRO_C #include "perl.h" struct mro_meta* @@ -83,8 +84,8 @@ invalidated). =cut */ -AV* -Perl_mro_get_linear_isa_dfs(pTHX_ HV *stash, I32 level) +static AV* +S_mro_get_linear_isa_dfs(pTHX_ HV *stash, I32 level) { AV* retval; GV** gvp; @@ -197,8 +198,8 @@ invalidated). =cut */ -AV* -Perl_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level) +static AV* +S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level) { AV* retval; GV** gvp; diff --git a/proto.h b/proto.h index 2545b51..aa59c25 100644 --- a/proto.h +++ b/proto.h @@ -4697,12 +4697,14 @@ PERL_CALLCONV struct mro_meta* Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, C PERL_CALLCONV AV* Perl_mro_get_linear_isa(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV AV* Perl_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level) +#if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT) +STATIC AV* S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV AV* Perl_mro_get_linear_isa_dfs(pTHX_ HV* stash, I32 level) +STATIC AV* S_mro_get_linear_isa_dfs(pTHX_ HV* stash, I32 level) __attribute__nonnull__(pTHX_1); +#endif PERL_CALLCONV void Perl_mro_isa_changed_in(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1);