diff options
author | Karl Williamson <khw@cpan.org> | 2018-12-22 21:32:55 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-12-25 09:08:10 -0700 |
commit | 7e9b4fe4d85e9b669993bf96a7e33ffff3197e20 (patch) | |
tree | 1e31fd5b99fa75b757c4851bd34ac550095a10bf /regen | |
parent | 8deb65d1e9fb6398838859f9fba258ddc14f34b6 (diff) | |
download | perl-7e9b4fe4d85e9b669993bf96a7e33ffff3197e20.tar.gz |
regen/mk_invlists.pl: Fix bug when 2 ident tables
If two tables are identical, the code created a #define of one index of
a pointer array to be the other index. But in some cases, that's not sufficient,
and the actual pointer must be defined in terms of the other. This
showed up in compiling perl with an early Unicode version, but the
circumstances could arise again in a future version.
Diffstat (limited to 'regen')
-rw-r--r-- | regen/mk_invlists.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl index 980b90cafe..780acaf7e9 100644 --- a/regen/mk_invlists.pl +++ b/regen/mk_invlists.pl @@ -2508,10 +2508,12 @@ foreach my $property (sort # And a #define for all simple names equivalent to a perl property, # except those that begin with 'is' or 'in'; if (exists $perl_tags{$tag} && $property !~ / ^ i[ns] | = /x) { - push @perl_prop_synonyms, "#define " - . $table_name_prefix - . uc(sanitize_name($define)) + my $name = $table_name_prefix . uc(sanitize_name($define)); + push @perl_prop_synonyms, "#define $name" . " $defined_to"; + push @perl_prop_synonyms, "#define " + . "${name}_invlist" + . " ${defined_to}_invlist"; } } } @@ -2975,7 +2977,7 @@ output_table_trailer(); print $out_fh join "\n", "\n", #'# ifdef DOINIT', #"\n", - "/* Synonyms for perl properties */", + "/* Synonyms for perl properties, and their tables */", @perl_prop_synonyms, #"\n", #"# endif /* DOINIT */", |