cli: add and use macro for creating NmcMetaGenericInfo parent groups

This commit is contained in:
Thomas Haller
2018-04-26 17:26:52 +02:00
parent 0cba6bf1d2
commit 69d5fc9bce
2 changed files with 8 additions and 12 deletions

View File

@@ -159,6 +159,12 @@ struct _NmcMetaGenericInfo {
#define NMC_META_GENERIC_WITH_NESTED(n, nest, ...) \
NMC_META_GENERIC (n, .nested = (nest), __VA_ARGS__)
#define NMC_META_GENERIC_GROUP(_group_name, _nested, _name_header) \
((const NMMetaAbstractInfo *const*) ((const NmcMetaGenericInfo *const[]) { \
NMC_META_GENERIC_WITH_NESTED (_group_name,_nested, .name_header = _name_header), \
NULL, \
}))
/*****************************************************************************/
gboolean nmc_print (const NmcConfig *nmc_config,