summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-09-03 07:02:23 -0600
committerKarl Williamson <khw@cpan.org>2022-09-10 09:27:17 -0600
commit988faa118b300f3ea030afabdbdbe464d204ddb1 (patch)
tree7e3a4b19846a1d564727e3afb4a453b73b515745 /locale.c
parentf4fdec1fc8df1ef0400134e720b67589da5c8200 (diff)
downloadperl-988faa118b300f3ea030afabdbdbe464d204ddb1.tar.gz
locale.c: Silence compiler warning about S_mortalixzed_pv_copy
This function is not used unless locales are enabled, so need not be defined unless that is true.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/locale.c b/locale.c
index fe0719bd4f..ada1476c35 100644
--- a/locale.c
+++ b/locale.c
@@ -119,6 +119,8 @@ static int debug_initialization = 0;
# include <wctype.h>
#endif
+#ifdef USE_LOCALE
+
PERL_STATIC_INLINE const char *
S_mortalized_pv_copy(pTHX_ const char * const pv)
{
@@ -136,6 +138,7 @@ S_mortalized_pv_copy(pTHX_ const char * const pv)
return copy;
}
+#endif
/* Returns the Unix errno portion; ignoring any others. This is a macro here
* instead of putting it into perl.h, because unclear to khw what should be