This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Add field to constructor
authorKarl Williamson <khw@cpan.org>
Thu, 14 Jan 2016 22:08:58 +0000 (15:08 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 19 Jan 2016 22:08:59 +0000 (15:08 -0700)
This allows a default value to be specified, to prepare for a later
commit.

charclass_invlists.h
lib/unicore/mktables
regcharclass.h

index 0769980..69c0054 100644 (file)
@@ -74615,7 +74615,7 @@ static const UV XPosixXDigit_invlist[] = { /* for EBCDIC 037 */
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * cd8623059fc882357fcf6fdea363d1c927af6ad1506e5aea5d383070344183f6 lib/unicore/mktables
+ * 7207e0295a307350a2cd53daa01ad55fd208e138281115b82b0e071d4cf7023a lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl
  * 3a11076601d4ef1da287c48cfbd4abb0f23efba4865e953aeae0fd974dc914c0 regen/mk_invlists.pl
index 4297fcf..62c2488 100644 (file)
@@ -2284,7 +2284,11 @@ sub trace { return main::trace(@_); }
     # may not be the actual reality, but probably nobody cares anyway for
     # these obsolete characters.)
     #
-    # [3] if present must be the string 'ONLY_EARLY'.  Normally, when
+    # [3] if present is the default value for the property to assign for code
+    # points not given in the input.  If not present, the default from the
+    # normal property is used
+    #
+    # [4] if present must be the string 'ONLY_EARLY'.  Normally, when
     # compiling Unicode versions that don't invoke the early handling, the
     # name in [1] is added as an alias to the property name used for these.
     # This parameter says to not do this.
@@ -2409,8 +2413,8 @@ sub trace { return main::trace(@_); }
         my $progress;
         my $function_instead_of_file = 0;
 
-        if ($early{$addr}->@* > 3 && $early{$addr}[3] ne 'ONLY_EARLY') {
-            Carp::my_carp_bug("If present, element [3] in 'Early => [ ... ]'"
+        if ($early{$addr}->@* > 4 && $early{$addr}[4] ne 'ONLY_EARLY') {
+            Carp::my_carp_bug("If present, element [4] in 'Early => [ ... ]'"
                             . " must be the string 'ONLY_EARLY'");
         }
 
@@ -2438,10 +2442,13 @@ sub trace { return main::trace(@_); }
                                                 Perl_Extension => 1,
                                                 );
 
-                # Use the default mapping for the regular property for this
-                # substitute one.
-                if (    defined $property{$addr}
-                    &&  defined $default_mapping{$property{$addr}})
+                # If not specified by the constructor, use the default mapping
+                # for the regular property for this substitute one.
+                if ($early{$addr}[3]) {
+                    $prop_object->set_default_map($early{$addr}[3]);
+                }
+                elsif (    defined $property{$addr}
+                       &&  defined $default_mapping{$property{$addr}})
                 {
                     $prop_object
                         ->set_default_map($default_mapping{$property{$addr}});
@@ -2489,7 +2496,7 @@ END
                 push $each_line_handler{$addr}->@*, \&_exclude_unassigned;
 
                 if (   $v_version lt v2.0        # Hanguls in this release ...
-                    && defined $early{$addr}[3]) # ... need special treatment
+                    && defined $early{$addr}[4]) # ... need special treatment
                 {
                     push $eof_handler{$addr}->@*, \&_fixup_obsolete_hanguls;
                 }
index 7847239..f76949b 100644 (file)
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * cd8623059fc882357fcf6fdea363d1c927af6ad1506e5aea5d383070344183f6 lib/unicore/mktables
+ * 7207e0295a307350a2cd53daa01ad55fd208e138281115b82b0e071d4cf7023a lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl
  * d9c04ac46bdd81bb3e26519f2b8eb6242cb12337205add3f7cf092b0c58dccc4 regen/regcharclass.pl