diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-03-11 15:47:53 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-03-12 13:27:55 -0600 |
commit | 8120045400790e80eeca2ed84ec4decbaa9c27a6 (patch) | |
tree | 1c847a7dc9095582311d393a55596e4d52b17b24 /regen | |
parent | f7866a8bf5b54e475ca2ed917f5767b7573c6c8e (diff) | |
download | perl-8120045400790e80eeca2ed84ec4decbaa9c27a6.tar.gz |
regen/regcharclass.pl: Generate correct macro instead of skipping
It makes no sense to check for length safeness for The macros generated
by this program which take a single UV code point as a parameter. Prior
to this patch, it would skip trying to generate them if asked. But,
because of the way things are structured, that means that if you need
just this and the safe versions, you can't do it so easily. What this
commit does is generate the cp macro if requested even if the 'safe'
version of other macros are also requested.
Diffstat (limited to 'regen')
-rwxr-xr-x | regen/regcharclass.pl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl index 5b794ea277..c62d31de94 100755 --- a/regen/regcharclass.pl +++ b/regen/regcharclass.pl @@ -1389,12 +1389,11 @@ EOF my ( $type, $ret )= split /-/, $type_spec; $ret ||= 'len'; foreach my $mod ( @mods ) { - next if $mod eq 'safe' and $type =~ /^cp/; delete $mods{$mod}; my $macro= $obj->make_macro( type => $type, ret_type => $ret, - safe => $mod eq 'safe' + safe => $mod eq 'safe' && $type !~ /^cp/, ); print $out_fh $macro, "\n"; } |