From: Nicholas Clark Date: Wed, 26 Nov 2008 21:56:46 +0000 (+0000) Subject: pmtrans() and refkids() can be static in op.c. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d86688dc4cee41db564627f19bab42e3d945cb6;p=p5sagit%2Fp5-mst-13.2.git pmtrans() and refkids() can be static in op.c. p4raw-id: //depot/perl@34933 --- diff --git a/embed.fnc b/embed.fnc index c1d01e3..e0b84c2 100644 --- a/embed.fnc +++ b/embed.fnc @@ -711,12 +711,16 @@ s |void |pidgone |Pid_t pid|int status #endif Ap |void |pmflag |NN U32* pmfl|int ch p |OP* |pmruntime |NN OP *o|NN OP *expr|bool isreg -p |OP* |pmtrans |NN OP* o|NN OP* expr|NN OP* repl +#if defined(PERL_IN_OP_C) +s |OP* |pmtrans |NN OP* o|NN OP* expr|NN OP* repl +#endif Ap |void |pop_scope p |OP* |prepend_elem |I32 optype|NULLOK OP* head|NULLOK OP* tail Ap |void |push_scope Amb |OP* |ref |NULLOK OP* o|I32 type -p |OP* |refkids |NULLOK OP* o|I32 type +#if defined(PERL_IN_OP_C) +s |OP* |refkids |NULLOK OP* o|I32 type +#endif Ap |void |regdump |NN const regexp* r Ap |void |regdump |NN const regexp* r Ap |SV* |regclass_swash |NULLOK const regexp *prog \ diff --git a/embed.h b/embed.h index 6309734..b5911b6 100644 --- a/embed.h +++ b/embed.h @@ -694,15 +694,21 @@ #define pmflag Perl_pmflag #ifdef PERL_CORE #define pmruntime Perl_pmruntime -#define pmtrans Perl_pmtrans +#endif +#if defined(PERL_IN_OP_C) +#ifdef PERL_CORE +#define pmtrans S_pmtrans +#endif #endif #define pop_scope Perl_pop_scope #ifdef PERL_CORE #define prepend_elem Perl_prepend_elem #endif #define push_scope Perl_push_scope +#if defined(PERL_IN_OP_C) #ifdef PERL_CORE -#define refkids Perl_refkids +#define refkids S_refkids +#endif #endif #define regdump Perl_regdump #define regdump Perl_regdump @@ -3032,15 +3038,21 @@ #define pmflag(a,b) Perl_pmflag(aTHX_ a,b) #ifdef PERL_CORE #define pmruntime(a,b,c) Perl_pmruntime(aTHX_ a,b,c) -#define pmtrans(a,b,c) Perl_pmtrans(aTHX_ a,b,c) +#endif +#if defined(PERL_IN_OP_C) +#ifdef PERL_CORE +#define pmtrans(a,b,c) S_pmtrans(aTHX_ a,b,c) +#endif #endif #define pop_scope() Perl_pop_scope(aTHX) #ifdef PERL_CORE #define prepend_elem(a,b,c) Perl_prepend_elem(aTHX_ a,b,c) #endif #define push_scope() Perl_push_scope(aTHX) +#if defined(PERL_IN_OP_C) #ifdef PERL_CORE -#define refkids(a,b) Perl_refkids(aTHX_ a,b) +#define refkids(a,b) S_refkids(aTHX_ a,b) +#endif #endif #define regdump(a) Perl_regdump(aTHX_ a) #define regdump(a) Perl_regdump(aTHX_ a) diff --git a/op.c b/op.c index 024996d..f2ad701 100644 --- a/op.c +++ b/op.c @@ -1769,8 +1769,8 @@ S_is_handle_constructor(const OP *o, I32 numargs) } } -OP * -Perl_refkids(pTHX_ OP *o, I32 type) +static OP * +S_refkids(pTHX_ OP *o, I32 type) { if (o && o->op_flags & OPf_KIDS) { OP *kid; @@ -3123,8 +3123,8 @@ static int uvcompare(const void *a, const void *b) return 0; } -OP * -Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) +static OP * +S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) { dVAR; SV * const tstr = ((SVOP*)expr)->op_sv; diff --git a/proto.h b/proto.h index 42377d37..18071f8 100644 --- a/proto.h +++ b/proto.h @@ -2511,18 +2511,22 @@ PERL_CALLCONV OP* Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg) #define PERL_ARGS_ASSERT_PMRUNTIME \ assert(o); assert(expr) -PERL_CALLCONV OP* Perl_pmtrans(pTHX_ OP* o, OP* expr, OP* repl) +#if defined(PERL_IN_OP_C) +STATIC OP* S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_PMTRANS \ assert(o); assert(expr); assert(repl) +#endif PERL_CALLCONV void Perl_pop_scope(pTHX); PERL_CALLCONV OP* Perl_prepend_elem(pTHX_ I32 optype, OP* head, OP* tail); PERL_CALLCONV void Perl_push_scope(pTHX); /* PERL_CALLCONV OP* Perl_ref(pTHX_ OP* o, I32 type); */ -PERL_CALLCONV OP* Perl_refkids(pTHX_ OP* o, I32 type); +#if defined(PERL_IN_OP_C) +STATIC OP* S_refkids(pTHX_ OP* o, I32 type); +#endif PERL_CALLCONV void Perl_regdump(pTHX_ const regexp* r) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REGDUMP \