This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/mk_invlists.pl: Move some code around
authorKarl Williamson <khw@cpan.org>
Thu, 19 Apr 2018 17:04:37 +0000 (11:04 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 20 Apr 2018 07:11:51 +0000 (01:11 -0600)
This is in preparation for a future commit

charclass_invlists.h
regen/mk_invlists.pl

index 0197052..98f5adf 100644 (file)
@@ -170534,5 +170534,5 @@ static const U8 WB_table[24][24] = {
  * ba5b13123afb59ea004c14fcbac80b5ff428c5b8f1b84bf8602b4ffb7da0407f lib/unicore/mktables
  * 21653d2744fdd071f9ef138c805393901bb9547cf3e777ebf50215a191f986ea lib/unicore/version
  * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl
- * f171fb8760e1dc7afd4cce3af4e54bfa5fcb98ac41e4c9eefe2ccf139d2fda1b regen/mk_invlists.pl
+ * 795035df1100cf2e6a79dda246226da7b59279dad9788fea9ae59e659008902d regen/mk_invlists.pl
  * ex: set ro: */
index 31716c4..7f0a4d2 100644 (file)
@@ -2169,8 +2169,12 @@ for my $charset (get_supported_code_pages()) {
                     # in scalar context to differentiate
                     my $count = prop_invlist($lookup_prop,
                                              '_perl_core_internal_ok');
+                    if (defined $count) {
+                        # Short-circuit an empty inversion list.
+                        output_invlist($prop_name, \@invlist, $charset);
+                        next;
+                    }
                     die "Could not find inversion list for '$lookup_prop'"
-                                                          unless defined $count;
                 }
                 else {
                     @invlist = @$list_ref;
@@ -2183,13 +2187,6 @@ for my $charset (get_supported_code_pages()) {
             }
         }
 
-
-        # Short-circuit an empty inversion list.
-        if (! @invlist) {
-            output_invlist($prop_name, \@invlist, $charset);
-            next;
-        }
-
         # Re-order the Unicode code points to native ones for this platform.
         # This is only needed for code points below 256, because native code
         # points are only in that range.  For inversion maps of properties