Skip to content

Commit 6c1b85b

Browse files
committed
kernel-doc: Handle returning pointers to pointers
HINT: this is the python version of a patch submitted to the kernel-doc ML by Matthew Wilcox. Origin (perl) comes from: https://www.mail-archive.com/linux-doc@vger.kernel.org/msg08989.html Clearly nobody ever tried to build the documentation for the radix tree before: include/linux/radix-tree.h:400: warning: cannot understand function prototype: 'void ** radix_tree_iter_init(struct radix_tree_iter *iter, unsigned long start) ' Indeed, the regexes only handled a single '*', not one-or-more. I have tried to fix that, but now I have perl regexes all over my hands, and I fear I shall never be clean again. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 parent 5fd0fbe commit 6c1b85b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

linuxdoc/kernel_doc.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,21 @@ def __getitem__(self, group):
208208
# RE(r"^(\w+)\s+\(\*([a-zA-Z0-9_]+)\)\s*\(([^\(]*)\)") # match: void (*foo) (int bar);
209209
RE(r"^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
210210
, RE(r"^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
211-
, RE(r"^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
211+
, RE(r"^(\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
212212
, RE(r"^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
213213
, RE(r"^(\w+\s+\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
214214
, RE(r"^(\w+\s+\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
215-
, RE(r"^(\w+\s+\w+\s+\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)")
215+
, RE(r"^(\w+\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228
EXPORTED_SYMBOLS = RE(

0 commit comments

Comments
 (0)