This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.h: Renumber flag bits
authorKarl Williamson <khw@cpan.org>
Sat, 10 Dec 2016 19:27:19 +0000 (12:27 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 23 Dec 2016 23:48:35 +0000 (16:48 -0700)
This creates a gap that will be filled by future commits

ext/XS-APItest/t/utf8.t
utf8.h

index 05693c0..1b0b1da 100644 (file)
@@ -99,20 +99,20 @@ my $UTF8_ALLOW_SHORT            = 0x0008;
 my $UTF8_GOT_SHORT              = $UTF8_ALLOW_SHORT;
 my $UTF8_ALLOW_LONG             = 0x0010;
 my $UTF8_GOT_LONG               = $UTF8_ALLOW_LONG;
-my $UTF8_GOT_OVERFLOW           = 0x0020;
-my $UTF8_DISALLOW_SURROGATE     = 0x0040;
+my $UTF8_GOT_OVERFLOW           = 0x0080;
+my $UTF8_DISALLOW_SURROGATE     = 0x0100;
 my $UTF8_GOT_SURROGATE          = $UTF8_DISALLOW_SURROGATE;
-my $UTF8_WARN_SURROGATE         = 0x0080;
-my $UTF8_DISALLOW_NONCHAR       = 0x0100;
+my $UTF8_WARN_SURROGATE         = 0x0200;
+my $UTF8_DISALLOW_NONCHAR       = 0x0400;
 my $UTF8_GOT_NONCHAR            = $UTF8_DISALLOW_NONCHAR;
-my $UTF8_WARN_NONCHAR           = 0x0200;
-my $UTF8_DISALLOW_SUPER         = 0x0400;
+my $UTF8_WARN_NONCHAR           = 0x0800;
+my $UTF8_DISALLOW_SUPER         = 0x1000;
 my $UTF8_GOT_SUPER              = $UTF8_DISALLOW_SUPER;
-my $UTF8_WARN_SUPER             = 0x0800;
-my $UTF8_DISALLOW_ABOVE_31_BIT  = 0x1000;
+my $UTF8_WARN_SUPER             = 0x2000;
+my $UTF8_DISALLOW_ABOVE_31_BIT  = 0x4000;
 my $UTF8_GOT_ABOVE_31_BIT       = $UTF8_DISALLOW_ABOVE_31_BIT;
-my $UTF8_WARN_ABOVE_31_BIT      = 0x2000;
-my $UTF8_CHECK_ONLY             = 0x4000;
+my $UTF8_WARN_ABOVE_31_BIT      = 0x8000;
+my $UTF8_CHECK_ONLY             = 0x10000;
 my $UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE
                              = $UTF8_DISALLOW_SUPER|$UTF8_DISALLOW_SURROGATE;
 my $UTF8_DISALLOW_ILLEGAL_INTERCHANGE
diff --git a/utf8.h b/utf8.h
index 5568039..3da10e0 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -743,33 +743,33 @@ case any call to string overloading updates the internal UTF-8 encoding flag.
 #define UTF8_GOT_LONG                   UTF8_ALLOW_LONG
 
 /* Currently no way to allow overflow */
-#define UTF8_GOT_OVERFLOW               0x0020
+#define UTF8_GOT_OVERFLOW               0x0080
 
-#define UTF8_DISALLOW_SURROGATE                0x0040  /* Unicode surrogates */
+#define UTF8_DISALLOW_SURROGATE                0x0100  /* Unicode surrogates */
 #define UTF8_GOT_SURROGATE             UTF8_DISALLOW_SURROGATE
-#define UTF8_WARN_SURROGATE            0x0080
+#define UTF8_WARN_SURROGATE            0x0200
 
-#define UTF8_DISALLOW_NONCHAR           0x0100 /* Unicode non-character */
+#define UTF8_DISALLOW_NONCHAR           0x0400 /* Unicode non-character */
 #define UTF8_GOT_NONCHAR                UTF8_DISALLOW_NONCHAR
-#define UTF8_WARN_NONCHAR               0x0200 /*  code points */
+#define UTF8_WARN_NONCHAR               0x0800 /*  code points */
 
-#define UTF8_DISALLOW_SUPER            0x0400  /* Super-set of Unicode: code */
+#define UTF8_DISALLOW_SUPER            0x1000  /* Super-set of Unicode: code */
 #define UTF8_GOT_SUPER                 UTF8_DISALLOW_SUPER
-#define UTF8_WARN_SUPER                        0x0800  /* points above the legal max */
+#define UTF8_WARN_SUPER                        0x2000  /* points above the legal max */
 
 /* Code points which never were part of the original UTF-8 standard, which only
  * went up to 2 ** 31 - 1.  Note that these all overflow a signed 32-bit word,
  * The first byte of these code points is FE or FF on ASCII platforms.  If the
  * first byte is FF, it will overflow a 32-bit word. */
-#define UTF8_DISALLOW_ABOVE_31_BIT      0x1000
+#define UTF8_DISALLOW_ABOVE_31_BIT      0x4000
 #define UTF8_GOT_ABOVE_31_BIT           UTF8_DISALLOW_ABOVE_31_BIT
-#define UTF8_WARN_ABOVE_31_BIT          0x2000
+#define UTF8_WARN_ABOVE_31_BIT          0x8000
 
 /* For back compat, these old names are misleading for UTF_EBCDIC */
 #define UTF8_DISALLOW_FE_FF             UTF8_DISALLOW_ABOVE_31_BIT
 #define UTF8_WARN_FE_FF                 UTF8_WARN_ABOVE_31_BIT
 
-#define UTF8_CHECK_ONLY                        0x4000
+#define UTF8_CHECK_ONLY                        0x10000
 
 /* For backwards source compatibility.  They do nothing, as the default now
  * includes what they used to mean.  The first one's meaning was to allow the