[libvirt] [PATCH] Move comment after enum members

Eric Blake eblake at redhat.com
Thu Jan 10 01:06:51 UTC 2013


On 01/09/2013 07:20 AM, Claudio Bley wrote:
> The api builder always associates comments to the last member it read,
> not to the current member even if there was a comment for the previous
> member and a comma was already seen.
> 
> This has the effect that the comment for the previous member gets
> overwritten and the current member has no comment at all.
> 
> Signed-off-by: Claudio Bley <cbley at av-test.de>
> ---
>  include/libvirt/libvirt.h.in |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index 09c89c5..9110fcf 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -127,12 +127,12 @@ typedef enum {
>                                      power management */
>  
>  #ifdef VIR_ENUM_SENTINELS
> -    /*
> -     * NB: this enum value will increase over time as new events are
> -     * added to the libvirt API. It reflects the last state supported
> -     * by this version of the libvirt API.
> -     */
>       VIR_DOMAIN_LAST
> +     /*

You changed indentation from 4 to 5; please fix that.  Oh, I see why -
VIR_DOMAIN_LAST is incorrectly indented to begin with.

> +      * NB: this enum value will increase over time as new events are
> +      * added to the libvirt API. It reflects the last state supported
> +      * by this version of the libvirt API.
> +      */
>  #endif
>  } virDomainState;

Hmm, I wonder if we should instead fix the doc-generation parser.  I'm
used to the style:

ONE, /* short comment for one */
/* longer comment for two */
TWO,
THREE, /* and short for three again */

But I guess I could live with this patch, if the style is forced on us
by the doc generator.  Anyone else with an opinion?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130109/c3dba080/attachment-0001.sig>


More information about the libvir-list mailing list