diff options
Diffstat (limited to 'tests/check-qom-proplist.c')
-rw-r--r-- | tests/check-qom-proplist.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index c51e6e734d..07e351f950 100644 --- a/tests/check-qom-proplist.c +++ b/tests/check-qom-proplist.c @@ -46,11 +46,14 @@ enum DummyAnimal { DUMMY_LAST, }; -static const char *const dummy_animal_map[DUMMY_LAST + 1] = { - [DUMMY_FROG] = "frog", - [DUMMY_ALLIGATOR] = "alligator", - [DUMMY_PLATYPUS] = "platypus", - [DUMMY_LAST] = NULL, +const QEnumLookup dummy_animal_map = { + .array = (const char *const[]) { + [DUMMY_FROG] = "frog", + [DUMMY_ALLIGATOR] = "alligator", + [DUMMY_PLATYPUS] = "platypus", + [DUMMY_LAST] = NULL, + }, + .size = DUMMY_LAST }; struct DummyObject { @@ -142,7 +145,7 @@ static void dummy_class_init(ObjectClass *cls, void *data) NULL); object_class_property_add_enum(cls, "av", "DummyAnimal", - dummy_animal_map, + &dummy_animal_map, dummy_get_av, dummy_set_av, NULL); |