summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-13 07:12:04 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-13 07:12:04 +0100
commit8ab8f082f7fb7802421b5fc8ff6576774161e703 (patch)
tree817b1110a0f96802a6b409dd5a0387776e393eee
parentf10f4c183a00badad8742a2a435477ad8cd8c6ee (diff)
downloadperl-8ab8f082f7fb7802421b5fc8ff6576774161e703.tar.gz
Use deprecate() in place of deprecate_old(), and remove S_deprecate_old().
-rw-r--r--embed.fnc3
-rw-r--r--embed.h10
-rw-r--r--pod/perldiag.pod4
-rw-r--r--proto.h7
-rw-r--r--toke.c25
5 files changed, 6 insertions, 43 deletions
diff --git a/embed.fnc b/embed.fnc
index e51d89acea..7e4ce514f4 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -215,9 +215,6 @@ 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
-#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 b987bd15e7..59e8174300 100644
--- a/embed.h
+++ b/embed.h
@@ -152,11 +152,6 @@
#define delete_eval_scope Perl_delete_eval_scope
#define deprecate Perl_deprecate
#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)
#ifdef PERL_CORE
@@ -2495,11 +2490,6 @@
#define delete_eval_scope() Perl_delete_eval_scope(aTHX)
#define deprecate(a) Perl_deprecate(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
#define vdie(a,b) S_vdie(aTHX_ a,b)
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index fb00adca83..ab9a947c6b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4685,12 +4685,12 @@ is deprecated. See L<perlvar/"$[">.
=item Use of bare << to mean <<"" is deprecated
-(D deprecated, W syntax) You are now encouraged to use the explicitly quoted
+(D deprecated) You are now encouraged to use the explicitly quoted
form if you wish to use an empty line as the terminator of the here-document.
=item Use of comma-less variable list is deprecated
-(D deprecated, W syntax) The values you give to a format should be
+(D deprecated) The values you give to a format should be
separated by commas, not just aligned on a line.
=item Use of chdir('') or chdir(undef) as chdir() deprecated
diff --git a/proto.h b/proto.h
index 05b38126c9..c99a25aad9 100644
--- a/proto.h
+++ b/proto.h
@@ -521,13 +521,6 @@ PERL_CALLCONV void Perl_deprecate(pTHX_ const char *const s)
#define PERL_ARGS_ASSERT_DEPRECATE \
assert(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 4e711ab57e..03cf6fd6e3 100644
--- a/toke.c
+++ b/toke.c
@@ -596,23 +596,6 @@ Perl_deprecate(pTHX_ const char *const s)
Perl_ck_warner(aTHX_ packWARN(WARN_DEPRECATED), "Use of %s is deprecated", 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 */
- /* */
- /* It is here to maintain backward compatibility with the pre-5.8 */
- /* warnings category hierarchy. The "deprecated" category used to */
- /* live under the "syntax" category. It is now a top-level category */
- /* in its own right. */
-
- PERL_ARGS_ASSERT_DEPRECATE_OLD;
-
- Perl_ck_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX),
- "Use of %s is deprecated", s);
-}
-
/*
* experimental text filters for win32 carriage-returns, utf16-to-utf8 and
* utf16-to-utf8-reversed.
@@ -4878,7 +4861,7 @@ Perl_yylex(pTHX)
if (PL_expect == XOPERATOR) {
if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
PL_expect = XTERM;
- deprecate_old(commaless_variable_list);
+ deprecate(commaless_variable_list);
return REPORT(','); /* grandfather non-comma-format format */
}
}
@@ -5136,7 +5119,7 @@ Perl_yylex(pTHX)
if (PL_expect == XOPERATOR) {
if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
PL_expect = XTERM;
- deprecate_old(commaless_variable_list);
+ deprecate(commaless_variable_list);
return REPORT(','); /* grandfather non-comma-format format */
}
else
@@ -5153,7 +5136,7 @@ Perl_yylex(pTHX)
if (PL_expect == XOPERATOR) {
if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
PL_expect = XTERM;
- deprecate_old(commaless_variable_list);
+ deprecate(commaless_variable_list);
return REPORT(','); /* grandfather non-comma-format format */
}
else
@@ -11292,7 +11275,7 @@ S_scan_heredoc(pTHX_ register char *s)
else
term = '"';
if (!isALNUM_lazy_if(s,UTF))
- deprecate_old("bare << to mean <<\"\"");
+ deprecate("bare << to mean <<\"\"");
for (; isALNUM_lazy_if(s,UTF); s++) {
if (d < e)
*d++ = *s;