Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
bt_ctf_field_type_init(&variant->parent);
+ /* A variant's alignment is undefined */
+ variant->parent.declaration->alignment = 0;
return &variant->parent;
error:
return NULL;
*
* @param type Field type.
*
- * Returns the field type's alignment on success, a negative value on error.
+ * Returns the field type's alignment on success, a negative value on error and
+ * 0 if the alignment is undefined (as in the case of a variant).
*/
extern int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type);