This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Define non-char in all Unicode releases
authorKarl Williamson <khw@cpan.org>
Fri, 26 Jun 2015 04:10:22 +0000 (22:10 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 29 Jul 2015 04:15:54 +0000 (22:15 -0600)
Perl needs the NChar property to compile, but Unicode did not furnish it
in early releases.  This commit will use the Unicode definition if
available, but otherwise computes it itself.

charclass_invlists.h
lib/unicore/mktables
regcharclass.h

index 6e82f98..df0bad5 100644 (file)
@@ -99521,7 +99521,7 @@ static const UV XPosixXDigit_invlist[] = { /* for EBCDIC POSIX-BC */
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * efa1520c72489a83c5cddfeb753fdfe6286fc2d2b8edde81a4172fdfee07177d lib/unicore/mktables
+ * 1e02b8ee33dd6b6fed406fffac710428b0edf135cd6464ca6b31602048946a63 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * f199f92c0b5f87882b0198936ea8ef3dc43627b57a77ac3eb9250bd2664bbd88 regen/mk_invlists.pl
index 559ae9d..98ecec7 100644 (file)
@@ -14512,6 +14512,21 @@ END
         $quotemeta += $temp & $Assigned;
     }
 
+    my $nchar = $perl->add_match_table('_Perl_Nchar',
+                                       Perl_Extension => 1,
+                                       Fate => $INTERNAL_ONLY);
+    if (defined (my $off_nchar = property_ref('Nchar'))) {
+        $nchar->initialize($off_nchar->table('Y'));
+    }
+    else {
+        $nchar->initialize([ 0xFFFE .. 0xFFFF ]);
+        if ($v_version ge v2.0) {   # First release with the other nchars
+            for (my $i = 0x1FFFE; $i <= 0x10FFFE; $i += 0x10000) {
+                $nchar += [ $i .. $i+1 ];
+            }
+        }
+    }
+
     # Finished creating all the perl properties.  All non-internal non-string
     # ones have a synonym of 'Is_' prefixed.  (Internal properties begin with
     # an underscore.)  These do not get a separate entry in the pod file
index ea25696..3715154 100644 (file)
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * efa1520c72489a83c5cddfeb753fdfe6286fc2d2b8edde81a4172fdfee07177d lib/unicore/mktables
+ * 1e02b8ee33dd6b6fed406fffac710428b0edf135cd6464ca6b31602048946a63 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * 8b29da548b7ad90659de234b5061a8c9fb0f40322a256d60fc5e9385ae4ece0e regen/regcharclass.pl