mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
docs: make kernel-doc handle varargs properly
As far as I can tell, the handling of "..." arguments has never worked right, so any documentation provided was ignored in favor of "variable arguments." This makes kernel-doc handle "@...:" as documented. It does *not* fix spots in kerneldoc comments that don't follow that convention, but they are no more broken than before. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
9d9cce7f10
commit
ef00028b20
@ -412,7 +412,7 @@ my $doc_com_body = '\s*\* ?';
|
||||
my $doc_decl = $doc_com . '(\w+)';
|
||||
# @params and a strictly limited set of supported section names
|
||||
my $doc_sect = $doc_com .
|
||||
'\s*(\@\w+|description|context|returns?|notes?|examples?)\s*:(.*)';
|
||||
'\s*(\@[.\w]+|\@\.\.\.|description|context|returns?|notes?|examples?)\s*:(.*)';
|
||||
my $doc_content = $doc_com_body . '(.*)';
|
||||
my $doc_block = $doc_com . 'DOC:\s*(.*)?';
|
||||
my $doc_inline_start = '^\s*/\*\*\s*$';
|
||||
@ -2351,6 +2351,7 @@ sub push_parameter($$$) {
|
||||
|
||||
if ($type eq "" && $param =~ /\.\.\.$/)
|
||||
{
|
||||
$param = "...";
|
||||
if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
|
||||
$parameterdescs{$param} = "variable arguments";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user