1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-11 09:17:52 +03:00

apibuild: Disallow 'returns' return description

Our documentation generator is a bit messy, to say the least. For
instance, the description to return values of a function is
searched within C comment. Currently, all lines that start with
'returns' or 'Returns' are viewed as return value description.
However, there are some valid uses where the 'returns' word is in
the middle of a sentence describing function behavior not the
return value. And there are no places where 'returns' is used to
describe return values.  For instance:
virDomainDetachDeviceFlags, virConnectNetworkEventRegisterAny and
virDomainGetDiskErrors. This leads to HTML documemtation being
generated incorrectly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2014-05-12 14:23:18 +02:00
parent 2bb520c802
commit 0f1a0fff0e

View File

@ -926,7 +926,7 @@ class CParser:
if i < len(l) and l[i] == ' ':
i = i + 1
l = l[i:]
if len(l) >= 6 and l[0:7] == "returns" or l[0:7] == "Returns":
if len(l) >= 6 and l[0:7] == "Returns":
try:
l = string.split(l, ' ', 1)[1]
except: