diff options
author | Yves Orton <demerphq@gmail.com> | 2023-03-08 09:11:58 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-03-18 21:00:54 +0800 |
commit | 905584a6fe44cfcb198cc15af5e082ceb57ccf85 (patch) | |
tree | bdf8158733b2f6a4166b596ed4515e9c6f17296c /utf8.c | |
parent | b27367cd9b0173682dfe824a2d1d8d70c6f538c0 (diff) | |
download | perl-905584a6fe44cfcb198cc15af5e082ceb57ccf85.tar.gz |
utf8.c - add category parameter to unused warn_on_first_deprecated_use function
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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", |