diff options
Diffstat (limited to 'include/qapi/util.h')
-rw-r--r-- | include/qapi/util.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/qapi/util.h b/include/qapi/util.h index 5e50d0c1ce..a7c3c64148 100644 --- a/include/qapi/util.h +++ b/include/qapi/util.h @@ -11,8 +11,13 @@ #ifndef QAPI_UTIL_H #define QAPI_UTIL_H -const char *qapi_enum_lookup(const char *const lookup[], int val); -int qapi_enum_parse(const char * const lookup[], const char *buf, +typedef struct QEnumLookup { + const char *const *array; + int size; +} QEnumLookup; + +const char *qapi_enum_lookup(const QEnumLookup *lookup, int val); +int qapi_enum_parse(const QEnumLookup *lookup, const char *buf, int def, Error **errp); int parse_qapi_name(const char *name, bool complete); |