qom: Add TYPE_CONTAINER macro

Provide a macro for the container type across QEMU source tree, rather than
hard code it every time.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-ID: <20241121192202.4155849-2-peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Peter Xu 2024-11-21 14:21:50 -05:00 committed by Philippe Mathieu-Daudé
parent 678bf8f22a
commit e469b331cd
4 changed files with 6 additions and 5 deletions

View file

@ -1734,7 +1734,7 @@ Object *object_get_root(void)
static Object *root;
if (!root) {
root = object_new("container");
root = object_new(TYPE_CONTAINER);
}
return root;
@ -1750,7 +1750,7 @@ Object *object_get_internal_root(void)
static Object *internal_root;
if (!internal_root) {
internal_root = object_new("container");
internal_root = object_new(TYPE_CONTAINER);
}
return internal_root;