#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qlist.h"
#include "qemu/cutils.h"
#include "libqtest.h"
-#include "qapi/qmp/types.h"
static const char *blacklist_x86[] = {
"xenfv", "xenpv", NULL
g_assert(response);
if (!recurse) {
- QDECREF(response);
+ qobject_unref(response);
return;
}
g_assert(qdict_haskey(response, "return"));
- list = qobject_to_qlist(qdict_get(response, "return"));
+ list = qobject_to(QList, qdict_get(response, "return"));
QLIST_FOREACH_ENTRY(list, entry) {
- tuple = qobject_to_qdict(qlist_entry_obj(entry));
+ tuple = qobject_to(QDict, qlist_entry_obj(entry));
bool is_child = strstart(qdict_get_str(tuple, "type"), "child<", NULL);
bool is_link = strstart(qdict_get_str(tuple, "type"), "link<", NULL);
path, prop);
/* qom-get may fail but should not, e.g., segfault. */
g_assert(tmp);
- QDECREF(tmp);
+ qobject_unref(tmp);
}
}
- QDECREF(response);
+ qobject_unref(response);
}
static void test_machine(gconstpointer data)
response = qmp("{ 'execute': 'quit' }");
g_assert(qdict_haskey(response, "return"));
- QDECREF(response);
+ qobject_unref(response);
qtest_end();
g_free(args);