Permalink
Browse files

pmtrans() and refkids() can be static in op.c.

p4raw-id: //depot/perl@34933
  • Loading branch information...
1 parent ed4173e commit 0d86688dc4cee41db564627f19bab42e3d945cb6 Nicholas Clark committed Nov 26, 2008
Showing with 32 additions and 12 deletions.
  1. +6 −2 embed.fnc
  2. +16 −4 embed.h
  3. +4 −4 op.c
  4. +6 −2 proto.h
View
@@ -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 \
View
20 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)
View
8 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;
View
@@ -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 \

0 comments on commit 0d86688

Please sign in to comment.