]> xenbits.xensource.com Git - libvirt.git/commit
libvirt-domain.h: Fix enum description placement
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 21 Jul 2017 10:46:18 +0000 (12:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 21 Jul 2017 10:46:18 +0000 (12:46 +0200)
commitf4cb85c6aff7c1d909115614d7d29ce7676789e6
treefcbc77ddf5c0d27b1b27dc13d5d93b385085eb18
parente04d1074f801a211e2767545e2816cc98d820dd3
libvirt-domain.h: Fix enum description placement

There are only two acceptable places for describing enum values.
It's either:

    typedef enum {
        /* Some long description. Therefore it's placed before
         * the value. */
        VIR_ENUM_A_VAL = 1,
    } virEnumA;

or:

    typedef enum {
        VIR_ENUM_B_VAL = 1, /* Some short description */
    } virEnumB;

However, during review of a patch sent upstream I realized that
is not always the case. I went through all the public header
files and identified all the offenders. Luckily there were just
two of them.

Yes, this makes our HTML generated documentation broken, but
that's bug of the generator. Our header files shouldn't be forced
to use something we don't want to.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
include/libvirt/libvirt-domain.h