diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-09-20 20:38:29 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-09-20 20:38:29 +0000 |
commit | 769eaa986656b102a639d9afcd41d433f2bd43b1 (patch) | |
tree | 14655f27febf306b70dfd4a10a943031ba7510b7 | |
parent | 06e1ee767cc67fbb1e84e19e2f202c8e0ff9b3cd (diff) |
treat unions as structs; fixes pr 1918, perl dudes never replied though
-rw-r--r-- | gnu/usr.bin/perl/utils/h2ph.PL | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/utils/h2ph.PL b/gnu/usr.bin/perl/utils/h2ph.PL index 855a899499a..59133153891 100644 --- a/gnu/usr.bin/perl/utils/h2ph.PL +++ b/gnu/usr.bin/perl/utils/h2ph.PL @@ -351,7 +351,7 @@ sub expr { # Eliminate typedefs /\(([\w\s]+)[\*\s]*\)\s*[\w\(]/ && do { foreach (split /\s+/, $1) { # Make sure all the words are types, - last unless ($isatype{$_} or $_ eq 'struct'); + last unless ($isatype{$_} or $_ eq 'struct' or $_ eq 'union'); } s/\([\w\s]+[\*\s]*\)// && next; # then eliminate them. }; @@ -374,7 +374,7 @@ sub expr { }; s/^([_a-zA-Z]\w*)// && do { my $id = $1; - if ($id eq 'struct') { + if ($id eq 'struct' || $id eq 'union') { s/^\s+(\w+)//; $id .= ' ' . $1; $isatype{$id} = 1; |