"If it's not private, it's public somehow." states Rafael. The most
Nicholas Clark [Wed, 26 Nov 2008 15:41:49 +0000 (15:41 +0000)]
reliable way I can see to keep our (unsupported) privates private is
to make them static whenever we can.

p4raw-id: //depot/perl@34918

embed.fnc
embed.h
op.c
proto.h

index d9eb78e..8a736be 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -445,7 +445,7 @@ Ap  |void   |op_null        |NN OP* o
 EXp    |void   |op_clear       |NN OP* o
 Ap     |void   |op_refcnt_lock
 Ap     |void   |op_refcnt_unlock
-p      |OP*    |linklist       |NN OP* o
+s      |OP*    |linklist       |NN OP *o
 p      |OP*    |list           |NULLOK OP* o
 p      |OP*    |listkids       |NULLOK OP* o
 Apd    |void   |load_module|U32 flags|NN SV* name|NULLOK SV* ver|...
diff --git a/embed.h b/embed.h
index 9f453d1..b3934d1 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define op_refcnt_lock         Perl_op_refcnt_lock
 #define op_refcnt_unlock       Perl_op_refcnt_unlock
 #ifdef PERL_CORE
-#define linklist               Perl_linklist
+#define linklist               S_linklist
 #define list                   Perl_list
 #define listkids               Perl_listkids
 #endif
 #define op_refcnt_lock()       Perl_op_refcnt_lock(aTHX)
 #define op_refcnt_unlock()     Perl_op_refcnt_unlock(aTHX)
 #ifdef PERL_CORE
-#define linklist(a)            Perl_linklist(aTHX_ a)
+#define linklist(a)            S_linklist(aTHX_ a)
 #define list(a)                        Perl_list(aTHX_ a)
 #define listkids(a)            Perl_listkids(aTHX_ a)
 #endif
diff --git a/op.c b/op.c
index 28440e0..0fd564e 100644 (file)
--- a/op.c
+++ b/op.c
@@ -786,7 +786,7 @@ Perl_op_refcnt_unlock(pTHX)
 #define LINKLIST(o) ((o)->op_next ? (o)->op_next : linklist((OP*)o))
 
 OP *
-Perl_linklist(pTHX_ OP *o)
+S_linklist(pTHX_ OP *o)
 {
     OP *first;
 
diff --git a/proto.h b/proto.h
index 4fb9ec4..26de531 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1446,7 +1446,7 @@ PERL_CALLCONV void        Perl_op_clear(pTHX_ OP* o)
 
 PERL_CALLCONV void     Perl_op_refcnt_lock(pTHX);
 PERL_CALLCONV void     Perl_op_refcnt_unlock(pTHX);
-PERL_CALLCONV OP*      Perl_linklist(pTHX_ OP* o)
+STATIC OP*     S_linklist(pTHX_ OP *o)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_LINKLIST      \
        assert(o)