diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-01-21 19:15:39 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-01-26 15:42:01 -0600 |
commit | df10ce6aa96ef6782250cec8ab53742144ed5c93 (patch) | |
tree | 2a2deceb3b1e2e29b3524ea5ffa54fd013d9c9e6 /qdict.c | |
parent | 59eb1c85cd5f416e8f8743db27d0c98c15b64d18 (diff) | |
download | qemu-df10ce6aa96ef6782250cec8ab53742144ed5c93.tar.gz qemu-df10ce6aa96ef6782250cec8ab53742144ed5c93.tar.bz2 qemu-df10ce6aa96ef6782250cec8ab53742144ed5c93.zip |
QDict: Introduce qdict_get_qdict()
A helper to retrieve a QDict from a QDict.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qdict.c')
-rw-r--r-- | qdict.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -216,6 +216,19 @@ QList *qdict_get_qlist(const QDict *qdict, const char *key) } /** + * qdict_get_qdict(): Get the QDict mapped by 'key' + * + * This function assumes that 'key' exists and it stores a + * QDict object. + * + * Return QDict mapped by 'key'. + */ +QDict *qdict_get_qdict(const QDict *qdict, const char *key) +{ + return qobject_to_qdict(qdict_get_obj(qdict, key, QTYPE_QDICT)); +} + +/** * qdict_get_str(): Get a pointer to the stored string mapped * by 'key' * |