X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utils%2Fh2ph.PL;h=79039968768eb920be038e3497298af89ff9914d;hb=1f5d76b278c27042e165bfe1509977a2765de939;hp=901f0bb8f81b76f5477b2b2232cc85ac5ffebda0;hpb=edf6e4ec734b175d478b17f1da78d9e6fe60025e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utils/h2ph.PL b/utils/h2ph.PL index 901f0bb..7903996 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -338,7 +338,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. }; @@ -361,7 +361,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;