aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qom-proplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check-qom-proplist.c')
-rw-r--r--tests/check-qom-proplist.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c
index c51e6e734d..92898e1520 100644
--- a/tests/check-qom-proplist.c
+++ b/tests/check-qom-proplist.c
@@ -46,11 +46,13 @@ 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",
+ },
+ .size = DUMMY_LAST
};
struct DummyObject {
@@ -142,7 +144,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);