In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4b8c6c21cda3d9cbafb72eda661edc9052aa2cec?hp=f8279d106847c47fc5a4092b27d4f24faffd84cd>

- Log -----------------------------------------------------------------
commit 4b8c6c21cda3d9cbafb72eda661edc9052aa2cec
Author: Nicholas Clark <[email protected]>
Date:   Mon Oct 12 11:24:15 2009 +0100

    deprecate_old() is not public, and only used within toke.c, so can be 
static.
-----------------------------------------------------------------------

Summary of changes:
 embed.fnc |    5 +++--
 embed.h   |   12 ++++++++++--
 proto.h   |    4 +++-
 toke.c    |    4 ++--
 4 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index 866363d..c76f0e7 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -215,8 +215,9 @@ Anp |char*  |delimcpy       |NN char* to|NN const char* 
toend|NN const char* from \
 pM     |void   |delete_eval_scope
 : Used in various files
 p      |void   |deprecate      |NN const char *const s
-: Used in various files
-p      |void   |deprecate_old  |NN const char *const s
+#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
+s      |void   |deprecate_old  |NN const char *const s
+#endif
 Afp    |OP*    |die            |NULLOK const char* pat|...
 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
 s      |OP*    |vdie           |NULLOK const char* pat|NULLOK va_list* args
diff --git a/embed.h b/embed.h
index c0e6953..cd254f5 100644
--- a/embed.h
+++ b/embed.h
@@ -151,7 +151,11 @@
 #ifdef PERL_CORE
 #define delete_eval_scope      Perl_delete_eval_scope
 #define deprecate              Perl_deprecate
-#define deprecate_old          Perl_deprecate_old
+#endif
+#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
+#ifdef PERL_CORE
+#define deprecate_old          S_deprecate_old
+#endif
 #endif
 #define die                    Perl_die
 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
@@ -2488,7 +2492,11 @@
 #ifdef PERL_CORE
 #define delete_eval_scope()    Perl_delete_eval_scope(aTHX)
 #define deprecate(a)           Perl_deprecate(aTHX_ a)
-#define deprecate_old(a)       Perl_deprecate_old(aTHX_ a)
+#endif
+#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
+#ifdef PERL_CORE
+#define deprecate_old(a)       S_deprecate_old(aTHX_ a)
+#endif
 #endif
 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
 #ifdef PERL_CORE
diff --git a/proto.h b/proto.h
index 983f953..df73c20 100644
--- a/proto.h
+++ b/proto.h
@@ -521,11 +521,13 @@ PERL_CALLCONV void        Perl_deprecate(pTHX_ const char 
*const s)
 #define PERL_ARGS_ASSERT_DEPRECATE     \
        assert(s)
 
-PERL_CALLCONV void     Perl_deprecate_old(pTHX_ const char *const s)
+#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
+STATIC void    S_deprecate_old(pTHX_ const char *const s)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_DEPRECATE_OLD \
        assert(s)
 
+#endif
 PERL_CALLCONV OP*      Perl_die(pTHX_ const char* pat, ...)
                        
__attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
 
diff --git a/toke.c b/toke.c
index 72bbc2f..c0eed00 100644
--- a/toke.c
+++ b/toke.c
@@ -597,8 +597,8 @@ Perl_deprecate(pTHX_ const char *const s)
        Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), "Use of %s is deprecated", 
s);
 }
 
-void
-Perl_deprecate_old(pTHX_ const char *const s)
+static void
+S_deprecate_old(pTHX_ const char *const s)
 {
     /* This function should NOT be called for any new deprecated warnings */
     /* Use Perl_deprecate instead                                         */

--
Perl5 Master Repository

Reply via email to