summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-08 09:11:58 +0100
committerYves Orton <demerphq@gmail.com>2023-03-18 21:00:54 +0800
commit905584a6fe44cfcb198cc15af5e082ceb57ccf85 (patch)
treebdf8158733b2f6a4166b596ed4515e9c6f17296c /utf8.c
parentb27367cd9b0173682dfe824a2d1d8d70c6f538c0 (diff)
downloadperl-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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/utf8.c b/utf8.c
index 14d92d09df..75e8a4cf8e 100644
--- a/utf8.c
+++ b/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",