mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
QDict: Introduce qdict_iter()
This adds iterator support to QDict, it will be used by the (to be introduced) QError module. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
422c46a81d
commit
21f800d340
2 changed files with 22 additions and 0 deletions
3
qdict.h
3
qdict.h
|
@ -27,6 +27,9 @@ void qdict_del(QDict *qdict, const char *key);
|
|||
int qdict_haskey(const QDict *qdict, const char *key);
|
||||
QObject *qdict_get(const QDict *qdict, const char *key);
|
||||
QDict *qobject_to_qdict(const QObject *obj);
|
||||
void qdict_iter(const QDict *qdict,
|
||||
void (*iter)(const char *key, QObject *obj, void *opaque),
|
||||
void *opaque);
|
||||
|
||||
/* Helper to qdict_put_obj(), accepts any object */
|
||||
#define qdict_put(qdict, key, obj) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue