This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/inc/utf8: make sure var is def'd before using
authorKarl Williamson <khw@cpan.org>
Tue, 9 Jul 2019 22:54:08 +0000 (16:54 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:51:28 +0000 (16:51 -0600)
I'm not sure that this makes a difference, but it's cleaner to not

 #define foo bar

if bar isn't defined.

(cherry picked from commit 686eafa088d7b41bc630e6889cbe546a46e8b366)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/inc/utf8

index 6498576..d7235bd 100644 (file)
@@ -11,7 +11,9 @@ sv_len_utf8_nomg
 
 __UNDEFINED__ UNICODE_REPLACEMENT  0xFFFD
 
+#ifdef UTF8_MAXLEN
 __UNDEFINED__  UTF8_MAXBYTES   UTF8_MAXLEN
+#endif
 
 __UNDEFINED__  UTF8_ALLOW_ANYUV                 0
 __UNDEFINED__  UTF8_ALLOW_EMPTY            0x0001