This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #132928] Save some bytes
authorKarl Williamson <khw@cpan.org>
Sat, 23 Mar 2019 17:01:58 +0000 (11:01 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 23 Mar 2019 17:07:36 +0000 (11:07 -0600)
This takes Zefram's approach to avoid duplicated string constants on
some compilers

regexec.c

index 00e822d..9d67da6 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -92,7 +92,7 @@ static const char utf8_locale_required[] =
 #ifdef DEBUGGING
 /* At least one required character in the target string is expressible only in
  * UTF-8. */
-static const char* const non_utf8_target_but_utf8_required
+static const char non_utf8_target_but_utf8_required[]
                 = "Can't match, because target string needs to be in UTF-8\n";
 #endif