winapi: Ignore function declarations that are too complex.

A few function declarations are simply too complex for the winapi
parser. Some are because they are in fact macro calls, and other because
they mix parentheses with array declarations or strange function pointer
types.
When that happens print an error message and ignore the function
declaration.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Francois Gouget 2020-04-14 16:57:00 +02:00 committed by Alexandre Julliard
parent ebbc0686ec
commit 4c554940d4
1 changed files with 5 additions and 1 deletions

View File

@ -492,7 +492,11 @@ sub parse_c_file($$) {
# die "$file: $.: syntax error: '$argument_type':'$argument_name'\n";
} else {
die "$file: $.: syntax error: '$argument'\n";
# This is either a complex argument type, typically
# involving parentheses, or a macro argument. This is rare
# so just ignore the 'function' declaration.
print STDERR "$file: $.: cannot parse declaration argument (ignoring): '$argument'\n";
next readmore;
}
$argument_type =~ s/\s*(?:const|volatile)\s*/ /g; # Remove const/volatile