This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/mk_invlists.pl: Allow enums/defines to be in re_comp.c
authorKarl Williamson <khw@cpan.org>
Mon, 24 Feb 2020 16:31:02 +0000 (09:31 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 2 Mar 2020 18:45:21 +0000 (11:45 -0700)
Tables, to save memory, that are for regcomp.c are excluded from
re_comp.c, but enums use no resources, and a later commit will want them
accessible from re_comp.c.  So change the code so that they can be
requested to be in re_comp.c

charclass_invlists.h
lib/unicore/uni_keywords.pl
regen/mk_invlists.pl
uni_keywords.h

index fb489e8..4fe899f 100644 (file)
@@ -419852,5 +419852,5 @@ static const U8 WB_table[23][23] = {
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
- * fb429fcdab7fc74f015ade1ddb6a8826880a239b290d59fc8b00a08bed58fc71 regen/mk_invlists.pl
+ * e41af0b13d98ffb8a360ee580822fa351f9df7b82783cab90aa2596ad5bb2c61 regen/mk_invlists.pl
  * ex: set ro: */
index 99db077..3269010 100644 (file)
 # 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
 # 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
 # 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
-# fb429fcdab7fc74f015ade1ddb6a8826880a239b290d59fc8b00a08bed58fc71 regen/mk_invlists.pl
+# e41af0b13d98ffb8a360ee580822fa351f9df7b82783cab90aa2596ad5bb2c61 regen/mk_invlists.pl
 # ex: set ro:
index ee7a51a..67df77d 100644 (file)
@@ -238,8 +238,10 @@ sub switch_pound_if ($$;$) {
     foreach my $element (@new_pound_if) {
 
         # regcomp.c is arranged so that the tables are not compiled in
-        # re_comp.c */
-        my $no_xsub = 1 if $element =~ / PERL_IN_ (?: REGCOMP ) _C /x;
+        # re_comp.c, but general enums and defines (which take no space) are
+        # compiled */
+        my $no_xsub = 1 if $name !~ /enum|define/
+                        && $element =~ / PERL_IN_ (?: REGCOMP ) _C /x;
         $element = "defined($element)";
         $element = "($element && ! defined(PERL_IN_XSUB_RE))" if $no_xsub;
     }
index a6a4712..5ad551f 100644 (file)
@@ -7541,6 +7541,6 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
- * fb429fcdab7fc74f015ade1ddb6a8826880a239b290d59fc8b00a08bed58fc71 regen/mk_invlists.pl
+ * e41af0b13d98ffb8a360ee580822fa351f9df7b82783cab90aa2596ad5bb2c61 regen/mk_invlists.pl
  * cf1d68efb7d919d302c4005641eae8d36da6d7850816ad374b0c00b45e609f43 regen/mph.pl
  * ex: set ro: */