summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-01-14 15:08:58 -0700
committerKarl Williamson <khw@cpan.org>2016-01-19 15:08:59 -0700
commit3d36fe127cbf19e6d72a6ff198c505c7ffdea50d (patch)
tree02e08c0ceed80f929e8fb44a95bf516191b067e0
parent190d69bb6df07eff7aa3c4c2b1e7389b7324800e (diff)
downloadperl-3d36fe127cbf19e6d72a6ff198c505c7ffdea50d.tar.gz
mktables: Add field to constructor
This allows a default value to be specified, to prepare for a later commit.
-rw-r--r--charclass_invlists.h2
-rw-r--r--lib/unicore/mktables23
-rw-r--r--regcharclass.h2
3 files changed, 17 insertions, 10 deletions
diff --git a/charclass_invlists.h b/charclass_invlists.h
index 07699807f8..69c0054966 100644
--- a/charclass_invlists.h
+++ b/charclass_invlists.h
@@ -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
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 4297fcf743..62c24885e1 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -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;
}
diff --git a/regcharclass.h b/regcharclass.h
index 7847239b25..f76949bd27 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -1894,7 +1894,7 @@
* 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