diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-10-02 22:41:19 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-10-06 11:09:35 -0400 |
commit | 19ab6044be0c55d529e875e3ee16fdd5c3b54d33 (patch) | |
tree | 2585574b891b315f42be61cb634d397ec419b7e1 | |
parent | 38a0d5bcdec74a3937a66a97179aeb7910aa0d4a (diff) | |
download | qemu-19ab6044be0c55d529e875e3ee16fdd5c3b54d33.zip qemu-19ab6044be0c55d529e875e3ee16fdd5c3b54d33.tar.gz qemu-19ab6044be0c55d529e875e3ee16fdd5c3b54d33.tar.bz2 |
kernel-doc: Handle function typedefs that return pointers
One example that was not being parsed correctly by kernel-doc is:
typedef Object *(ObjectPropertyResolve)(Object *obj,
void *opaque,
const char *part);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rwxr-xr-x | scripts/kernel-doc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 40ad782..57a4a72 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1318,8 +1318,8 @@ sub dump_typedef($$) { $x =~ s@/\*.*?\*/@@gos; # strip comments. # Parse function prototypes - if ($x =~ /typedef\s+(\w+)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/ || - $x =~ /typedef\s+(\w+)\s*(\w\S+)\s*\s*\((.*)\);/) { + if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/ || + $x =~ /typedef\s+(\w+\s*\**)\s*(\w\S+)\s*\s*\((.*)\);/) { # Function typedefs $return_type = $1; |