This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
char_class_invlists.h: Give re_comp.c access to enums,#defines
authorKarl Williamson <khw@cpan.org>
Mon, 24 Feb 2020 18:20:13 +0000 (11:20 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 2 Mar 2020 18:45:21 +0000 (11:45 -0700)
The previous commit changed the code so that enums and #defines could be
requested to be in re_comp.c.  This commit changes to use that new
capability.

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

index 4fe899f..abd200e 100644 (file)
@@ -413621,6 +413621,10 @@ const char * const deprecated_property_msgs[] = {
        "Supplanted by Line_Break property values; see www.unicode.org/reports/tr14"
 };
 
+#endif /* (defined(PERL_IN_REGCOMP_C) && ! defined(PERL_IN_XSUB_RE)) */
+
+#if defined(PERL_IN_REGCOMP_C)
+
 #define UNI_HYPHEN (UNI_HYPHEN_perl_aux + (MAX_UNI_KEYWORD_INDEX * 2))
 #define UNI_LB__SG (UNI_LB__SG_perl_aux + (MAX_UNI_KEYWORD_INDEX * 1))
 
@@ -414829,6 +414833,10 @@ typedef enum {
 
 #define MAX_UNI_KEYWORD_INDEX UNI__PERL_SURROGATE
 
+#endif /* defined(PERL_IN_REGCOMP_C) */
+
+#if (defined(PERL_IN_REGCOMP_C) && ! defined(PERL_IN_XSUB_RE))
+
 static const UV * const uni_prop_ptrs[] = {
        NULL,   /* Placeholder */
        UNI_ADLM_invlist,
@@ -416032,6 +416040,10 @@ static const UV * const uni_prop_ptrs[] = {
        UNI__PERL_SURROGATE_invlist
 };
 
+#endif /* (defined(PERL_IN_REGCOMP_C) && ! defined(PERL_IN_XSUB_RE)) */
+
+#if defined(PERL_IN_REGCOMP_C)
+
 
 /* Synonyms for perl properties */
 #define UNI_AHEX   UNI_POSIXXDIGIT
@@ -416075,6 +416087,10 @@ static const UV * const uni_prop_ptrs[] = {
 #define UNI_XPERLSPACE   UNI_XPOSIXSPACE
 
 
+#endif /* defined(PERL_IN_REGCOMP_C) */
+
+#if (defined(PERL_IN_REGCOMP_C) && ! defined(PERL_IN_XSUB_RE))
+
 static const char * const UNI_age_values[] = {
        "1.1",
        "2.0",
@@ -419852,5 +419868,5 @@ static const U8 WB_table[23][23] = {
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
- * e41af0b13d98ffb8a360ee580822fa351f9df7b82783cab90aa2596ad5bb2c61 regen/mk_invlists.pl
+ * 7a7e778e903508b1c244a77bae57ec57606ab775bb5f81719dbb122eb66d4259 regen/mk_invlists.pl
  * ex: set ro: */
index 3269010..6c1f236 100644 (file)
 # 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
 # 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
 # 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
-# e41af0b13d98ffb8a360ee580822fa351f9df7b82783cab90aa2596ad5bb2c61 regen/mk_invlists.pl
+# 7a7e778e903508b1c244a77bae57ec57606ab775bb5f81719dbb122eb66d4259 regen/mk_invlists.pl
 # ex: set ro:
index 67df77d..8c848cc 100644 (file)
@@ -3048,12 +3048,12 @@ foreach my $prop (@props) {
     }
 }
 
-switch_pound_if ('binary_property_tables', 'PERL_IN_REGCOMP_C');
-
 print $out_fh "\nconst char * const deprecated_property_msgs[] = {\n\t";
 print $out_fh join ",\n\t", map { "\"$_\"" } @deprecated_messages;
 print $out_fh "\n};\n";
 
+switch_pound_if ('binary_invlist_enum', 'PERL_IN_REGCOMP_C');
+
 my @enums = sort values %enums;
 
 # Save a copy of these before modification
@@ -3091,6 +3091,8 @@ print $out_fh "\n";
 print $out_fh "} binary_invlist_enum;\n";
 print $out_fh "\n#define MAX_UNI_KEYWORD_INDEX $enums[-1]\n";
 
+switch_pound_if ('binary_property_tables', 'PERL_IN_REGCOMP_C');
+
 output_table_header($out_fh, "UV *", "uni_prop_ptrs");
 print $out_fh "\tNULL,\t/* Placeholder */\n";
 print $out_fh "\t";
@@ -3099,6 +3101,8 @@ print $out_fh "\n";
 
 output_table_trailer();
 
+switch_pound_if ('synonym defines', 'PERL_IN_REGCOMP_C');
+
 print $out_fh join "\n", "\n",
                          #'#    ifdef DOINIT',
                          #"\n",
index 5ad551f..705a204 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
- * e41af0b13d98ffb8a360ee580822fa351f9df7b82783cab90aa2596ad5bb2c61 regen/mk_invlists.pl
+ * 7a7e778e903508b1c244a77bae57ec57606ab775bb5f81719dbb122eb66d4259 regen/mk_invlists.pl
  * cf1d68efb7d919d302c4005641eae8d36da6d7850816ad374b0c00b45e609f43 regen/mph.pl
  * ex: set ro: */