[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/21] kernel-doc: Handle function typedefs that return pointers
From: |
Eduardo Habkost |
Subject: |
[PULL 17/21] kernel-doc: Handle function typedefs that return pointers |
Date: |
Mon, 5 Oct 2020 17:09:56 -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>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-2-ehabkost@redhat.com>
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
- [PULL 05/21] hw/core/qdev-properties: Export enum-related functions, (continued)
- [PULL 05/21] hw/core/qdev-properties: Export enum-related functions, Eduardo Habkost, 2020/10/05
- [PULL 06/21] hw/core/qdev-properties: Export qdev_prop_enum, Eduardo Habkost, 2020/10/05
- [PULL 07/21] hw/core/qdev-properties: Export some integer-related functions, Eduardo Habkost, 2020/10/05
- [PULL 09/21] hw/core/cpu: Add missing 'exec/cpu-common.h' include, Eduardo Habkost, 2020/10/05
- [PULL 11/21] qom: Fix DECLARE_*CHECKER documentation, Eduardo Habkost, 2020/10/05
- [PULL 08/21] hw/core/qdev-properties: Extract system-mode specific properties, Eduardo Habkost, 2020/10/05
- [PULL 13/21] docs/devel/qom: Fix indentation of code blocks, Eduardo Habkost, 2020/10/05
- [PULL 10/21] qom: Improve error message displayed with missing object properties, Eduardo Habkost, 2020/10/05
- [PULL 12/21] docs/devel/qom: Fix indentation of bulleted list, Eduardo Habkost, 2020/10/05
- [PULL 15/21] docs/devel/qom: Remove usage of <code>, Eduardo Habkost, 2020/10/05
- [PULL 17/21] kernel-doc: Handle function typedefs that return pointers,
Eduardo Habkost <=
- [PULL 16/21] docs/devel/qom: Avoid long lines, Eduardo Habkost, 2020/10/05
- [PULL 20/21] memory: Explicitly tag doc comments for structs, Eduardo Habkost, 2020/10/05
- [PULL 18/21] kernel-doc: Handle function typedefs without asterisks, Eduardo Habkost, 2020/10/05
- [PULL 14/21] docs/devel/qom: Use *emphasis* for emphasis, Eduardo Habkost, 2020/10/05
- [PULL 21/21] kernel-doc: Remove $decl_type='type name' hack, Eduardo Habkost, 2020/10/05
- [PULL 19/21] qom: Explicitly tag doc comments for typedefs and structs, Eduardo Habkost, 2020/10/05
- Re: [PULL 00/21] machine + QOM queue, 2020-10-05, Peter Maydell, 2020/10/06