]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: split typedef and struct definition for apibuild.py
authorClaudio Bley <claudio.bley@gmail.com>
Thu, 18 Dec 2014 20:50:20 +0000 (21:50 +0100)
committerClaudio Bley <claudio.bley@gmail.com>
Fri, 19 Dec 2014 21:22:09 +0000 (22:22 +0100)
The members of struct virSecurityLabel and struct virSecurityModel
were not shown in the libvirt API docs because the corresponding
<field> elements were missing from the libvirt-api.xml.

The reason is that apibuild.py does not cope well with typedef's
using inline struct definitions. It fails to associate the comment
with the typedef and because of this refuses to write out the
field of the struct.

include/libvirt/libvirt-host.h

index 53b529f2144ac07d860c59ca0098a391b69848c4..0704672c9c4ccc24e5ee490bdd26f64485725fe6 100644 (file)
@@ -108,12 +108,13 @@ typedef virStream *virStreamPtr;
  * a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(),
  * providing the security label and associated attributes for the specified
  * domain.
- *
  */
-typedef struct _virSecurityLabel {
+typedef struct _virSecurityLabel virSecurityLabel;
+
+struct _virSecurityLabel {
     char label[VIR_SECURITY_LABEL_BUFLEN];    /* security label string */
     int enforcing;                            /* 1 if security policy is being enforced for domain */
-} virSecurityLabel;
+};
 
 /**
  * virSecurityLabelPtr:
@@ -142,12 +143,13 @@ typedef virSecurityLabel *virSecurityLabelPtr;
  * a virSecurityModel is a structure filled by virNodeGetSecurityModel(),
  * providing the per-hypervisor security model and DOI attributes for the
  * specified domain.
- *
  */
-typedef struct _virSecurityModel {
+typedef struct _virSecurityModel virSecurityModel;
+
+struct _virSecurityModel {
     char model[VIR_SECURITY_MODEL_BUFLEN];      /* security model string */
     char doi[VIR_SECURITY_DOI_BUFLEN];          /* domain of interpetation */
-} virSecurityModel;
+};
 
 /**
  * virSecurityModelPtr: