mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
utf8.c - add category parameter to unused warn_on_first_deprecated_use function
This commit is contained in:
parent
b27367cd9b
commit
905584a6fe
@ -5875,6 +5875,7 @@ RS |char * |unexpected_non_continuation_text \
|
||||
|const STRLEN expect_len
|
||||
# if 0
|
||||
S |void |warn_on_first_deprecated_use \
|
||||
|U32 category \
|
||||
|NN const char * const name \
|
||||
|NN const char * const alternative \
|
||||
|const bool use_locale \
|
||||
|
||||
2
embed.h
2
embed.h
@ -1630,7 +1630,7 @@
|
||||
# define turkic_uc(a,b,c,d) S_turkic_uc(aTHX_ a,b,c,d)
|
||||
# define unexpected_non_continuation_text(a,b,c,d) S_unexpected_non_continuation_text(aTHX_ a,b,c,d)
|
||||
# if 0
|
||||
# define warn_on_first_deprecated_use(a,b,c,d,e) S_warn_on_first_deprecated_use(aTHX_ a,b,c,d,e)
|
||||
# define warn_on_first_deprecated_use(a,b,c,d,e,f) S_warn_on_first_deprecated_use(aTHX_ a,b,c,d,e,f)
|
||||
# endif /* 0 */
|
||||
# endif /* defined(PERL_IN_UTF8_C) */
|
||||
# if defined(PERL_IN_UTIL_C)
|
||||
|
||||
2
proto.h
generated
2
proto.h
generated
@ -9523,7 +9523,7 @@ S_unexpected_non_continuation_text(pTHX_ const U8 * const s, STRLEN print_len, c
|
||||
|
||||
# if 0
|
||||
STATIC void
|
||||
S_warn_on_first_deprecated_use(pTHX_ const char * const name, const char * const alternative, const bool use_locale, const char * const file, const unsigned line);
|
||||
S_warn_on_first_deprecated_use(pTHX_ U32 category, const char * const name, const char * const alternative, const bool use_locale, const char * const file, const unsigned line);
|
||||
# define PERL_ARGS_ASSERT_WARN_ON_FIRST_DEPRECATED_USE \
|
||||
assert(name); assert(alternative); assert(file)
|
||||
|
||||
|
||||
9
utf8.c
9
utf8.c
@ -3316,7 +3316,8 @@ S_is_utf8_common(pTHX_ const U8 *const p, const U8 * const e,
|
||||
PERLVAR(I, seen_deprecated_macro, HV *)
|
||||
|
||||
STATIC void
|
||||
S_warn_on_first_deprecated_use(pTHX_ const char * const name,
|
||||
S_warn_on_first_deprecated_use(pTHX_ U32 category,
|
||||
const char * const name,
|
||||
const char * const alternative,
|
||||
const bool use_locale,
|
||||
const char * const file,
|
||||
@ -3326,7 +3327,7 @@ S_warn_on_first_deprecated_use(pTHX_ const char * const name,
|
||||
|
||||
PERL_ARGS_ASSERT_WARN_ON_FIRST_DEPRECATED_USE;
|
||||
|
||||
if (ckWARN_d(WARN_DEPRECATED)) {
|
||||
if (ckWARN_d(category)) {
|
||||
|
||||
key = Perl_form(aTHX_ "%s;%d;%s;%d", name, use_locale, file, line);
|
||||
if (! hv_fetch(PL_seen_deprecated_macro, key, strlen(key), 0)) {
|
||||
@ -3340,14 +3341,14 @@ S_warn_on_first_deprecated_use(pTHX_ const char * const name,
|
||||
}
|
||||
|
||||
if (instr(file, "mathoms.c")) {
|
||||
Perl_warner(aTHX_ WARN_DEPRECATED,
|
||||
Perl_warner(aTHX_ category,
|
||||
"In %s, line %d, starting in Perl v5.32, %s()"
|
||||
" will be removed. Avoid this message by"
|
||||
" converting to use %s().\n",
|
||||
file, line, name, alternative);
|
||||
}
|
||||
else {
|
||||
Perl_warner(aTHX_ WARN_DEPRECATED,
|
||||
Perl_warner(aTHX_ category,
|
||||
"In %s, line %d, starting in Perl v5.32, %s() will"
|
||||
" require an additional parameter. Avoid this"
|
||||
" message by converting to use %s().\n",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user