[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] kernel-doc: Handle function typedefs that return pointers
From: |
Eduardo Habkost |
Subject: |
[PATCH 1/5] kernel-doc: Handle function typedefs that return pointers |
Date: |
Fri, 2 Oct 2020 22:41:19 -0400 |
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>
---
scripts/kernel-doc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 40ad782e342..57a4a72970f 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;
--
2.26.2
- [PATCH 0/5] kernel-doc ixes, Eduardo Habkost, 2020/10/02
- [PATCH 2/5] kernel-doc: Handle function typedefs without asterisks, Eduardo Habkost, 2020/10/02
- [PATCH 1/5] kernel-doc: Handle function typedefs that return pointers,
Eduardo Habkost <=
- [PATCH 4/5] memory: Explicitly tag doc comments for structs, Eduardo Habkost, 2020/10/02
- [PATCH 5/5] kernel-doc: Remove $decl_type='type name' hack, Eduardo Habkost, 2020/10/02
- [PATCH 3/5] qom: Explicitly tag doc comments for typedefs and structs, Eduardo Habkost, 2020/10/02
- Re: [PATCH 0/5] kernel-doc ixes, Paolo Bonzini, 2020/10/03