aboutsummaryrefslogtreecommitdiff
path: root/qobject/qdict.c
diff options
context:
space:
mode:
Diffstat (limited to 'qobject/qdict.c')
-rw-r--r--qobject/qdict.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/qobject/qdict.c b/qobject/qdict.c
index e8f15f1132..23df84f9cd 100644
--- a/qobject/qdict.c
+++ b/qobject/qdict.c
@@ -14,8 +14,9 @@
#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qlist.h"
+#include "qapi/qmp/qnull.h"
#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qobject.h"
#include "qapi/error.h"
#include "qemu/queue.h"
#include "qemu-common.h"
@@ -143,6 +144,26 @@ void qdict_put_obj(QDict *qdict, const char *key, QObject *value)
}
}
+void qdict_put_int(QDict *qdict, const char *key, int64_t value)
+{
+ qdict_put(qdict, key, qnum_from_int(value));
+}
+
+void qdict_put_bool(QDict *qdict, const char *key, bool value)
+{
+ qdict_put(qdict, key, qbool_from_bool(value));
+}
+
+void qdict_put_str(QDict *qdict, const char *key, const char *value)
+{
+ qdict_put(qdict, key, qstring_from_str(value));
+}
+
+void qdict_put_null(QDict *qdict, const char *key)
+{
+ qdict_put(qdict, key, qnull());
+}
+
/**
* qdict_get(): Lookup for a given 'key'
*