aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r--tests/libqtest.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 6f33a37..43fb97e 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -517,8 +517,8 @@ void qmp_fd_sendv(int fd, const char *fmt, va_list ap)
/* Send QMP request */
socket_send(fd, str, qstring_get_length(qstr));
- QDECREF(qstr);
- qobject_decref(qobj);
+ qobject_unref(qstr);
+ qobject_unref(qobj);
}
}
@@ -585,7 +585,7 @@ void qtest_async_qmp(QTestState *s, const char *fmt, ...)
void qtest_qmpv_discard_response(QTestState *s, const char *fmt, va_list ap)
{
QDict *response = qtest_qmpv(s, fmt, ap);
- QDECREF(response);
+ qobject_unref(response);
}
void qtest_qmp_discard_response(QTestState *s, const char *fmt, ...)
@@ -596,7 +596,7 @@ void qtest_qmp_discard_response(QTestState *s, const char *fmt, ...)
va_start(ap, fmt);
response = qtest_qmpv(s, fmt, ap);
va_end(ap);
- QDECREF(response);
+ qobject_unref(response);
}
QDict *qtest_qmp_eventwait_ref(QTestState *s, const char *event)
@@ -609,7 +609,7 @@ QDict *qtest_qmp_eventwait_ref(QTestState *s, const char *event)
(strcmp(qdict_get_str(response, "event"), event) == 0)) {
return response;
}
- QDECREF(response);
+ qobject_unref(response);
}
}
@@ -618,7 +618,7 @@ void qtest_qmp_eventwait(QTestState *s, const char *event)
QDict *response;
response = qtest_qmp_eventwait_ref(s, event);
- QDECREF(response);
+ qobject_unref(response);
}
char *qtest_hmpv(QTestState *s, const char *fmt, va_list ap)
@@ -634,12 +634,12 @@ char *qtest_hmpv(QTestState *s, const char *fmt, va_list ap)
ret = g_strdup(qdict_get_try_str(resp, "return"));
while (ret == NULL && qdict_get_try_str(resp, "event")) {
/* Ignore asynchronous QMP events */
- QDECREF(resp);
+ qobject_unref(resp);
resp = qtest_qmp_receive(s);
ret = g_strdup(qdict_get_try_str(resp, "return"));
}
g_assert(ret);
- QDECREF(resp);
+ qobject_unref(resp);
g_free(cmd);
return ret;
}
@@ -1021,7 +1021,7 @@ void qtest_cb_for_every_machine(void (*cb)(const char *machine))
}
qtest_end();
- QDECREF(response);
+ qobject_unref(response);
}
/*
@@ -1050,7 +1050,7 @@ void qtest_qmp_device_add(const char *driver, const char *id, const char *fmt,
g_assert(response);
g_assert(!qdict_haskey(response, "event")); /* We don't expect any events */
g_assert(!qdict_haskey(response, "error"));
- QDECREF(response);
+ qobject_unref(response);
}
/*
@@ -1095,6 +1095,6 @@ void qtest_qmp_device_del(const char *id)
g_assert(event);
g_assert_cmpstr(qdict_get_str(event, "event"), ==, "DEVICE_DELETED");
- QDECREF(response1);
- QDECREF(response2);
+ qobject_unref(response1);
+ qobject_unref(response2);
}