scripts: kernel-doc: fix typedef identification
Some typedef expressions are output as normal functions. As we need to be clearer about the type with Sphinx 3.x, detect such cases. While here, fix a wrongly-indented block. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201117165312.118257-21-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
78c8c92c5d
commit
3999ffcf13
@ -1760,6 +1760,23 @@ sub dump_function($$) {
|
|||||||
check_return_section($file, $declaration_name, $return_type);
|
check_return_section($file, $declaration_name, $return_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The function parser can be called with a typedef parameter.
|
||||||
|
# Handle it.
|
||||||
|
if ($return_type =~ /typedef/) {
|
||||||
|
output_declaration($declaration_name,
|
||||||
|
'function',
|
||||||
|
{'function' => $declaration_name,
|
||||||
|
'typedef' => 1,
|
||||||
|
'module' => $modulename,
|
||||||
|
'functiontype' => $return_type,
|
||||||
|
'parameterlist' => \@parameterlist,
|
||||||
|
'parameterdescs' => \%parameterdescs,
|
||||||
|
'parametertypes' => \%parametertypes,
|
||||||
|
'sectionlist' => \@sectionlist,
|
||||||
|
'sections' => \%sections,
|
||||||
|
'purpose' => $declaration_purpose
|
||||||
|
});
|
||||||
|
} else {
|
||||||
output_declaration($declaration_name,
|
output_declaration($declaration_name,
|
||||||
'function',
|
'function',
|
||||||
{'function' => $declaration_name,
|
{'function' => $declaration_name,
|
||||||
@ -1772,6 +1789,7 @@ sub dump_function($$) {
|
|||||||
'sections' => \%sections,
|
'sections' => \%sections,
|
||||||
'purpose' => $declaration_purpose
|
'purpose' => $declaration_purpose
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub reset_state {
|
sub reset_state {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user