This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Fix wrong scope of #if's
authorKarl Williamson <khw@cpan.org>
Thu, 29 Nov 2018 18:50:58 +0000 (11:50 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 29 Nov 2018 19:02:37 +0000 (12:02 -0700)
The function print_bytes_for_locale() should be defined if DEBUGGING;
prior to this commit it didn't get defined unless LC_COLLATE was
defined on the platform.

locale.c

index c32dd3f..0c94042 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -4303,6 +4303,10 @@ S_print_collxfrm_input_and_return(pTHX_
     PerlIO_printf(Perl_debug_log, "'\n");
 }
 
+#  endif    /* DEBUGGING */
+#endif /* USE_LOCALE_COLLATE */
+#ifdef DEBUGGING
+
 STATIC void
 S_print_bytes_for_locale(pTHX_
                     const char * const s,
@@ -4338,8 +4342,7 @@ S_print_bytes_for_locale(pTHX_
     }
 }
 
-#  endif   /* #ifdef DEBUGGING */
-#endif /* USE_LOCALE_COLLATE */
+#endif   /* #ifdef DEBUGGING */
 
 #ifdef USE_LOCALE