Revision f2e17508
b/Makefile | ||
---|---|---|
246 | 246 |
|
247 | 247 |
check-qint: check-qint.o qint.o qemu-malloc.o |
248 | 248 |
check-qstring: check-qstring.o qstring.o qemu-malloc.o |
249 |
check-qdict: check-qdict.o qdict.o qint.o qstring.o qbool.o qemu-malloc.o |
|
249 |
check-qdict: check-qdict.o qdict.o qint.o qstring.o qbool.o qemu-malloc.o qlist.o
|
|
250 | 250 |
check-qlist: check-qlist.o qlist.o qint.o qemu-malloc.o |
251 | 251 |
check-qfloat: check-qfloat.o qfloat.o qemu-malloc.o |
252 | 252 |
check-qjson: check-qjson.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o qjson.o json-streamer.o json-lexer.o json-parser.o qemu-malloc.o |
b/qdict.c | ||
---|---|---|
204 | 204 |
} |
205 | 205 |
|
206 | 206 |
/** |
207 |
* qdict_get_qlist(): Get the QList mapped by 'key' |
|
208 |
* |
|
209 |
* This function assumes that 'key' exists and it stores a |
|
210 |
* QList object. |
|
211 |
* |
|
212 |
* Return QList mapped by 'key'. |
|
213 |
*/ |
|
214 |
QList *qdict_get_qlist(const QDict *qdict, const char *key) |
|
215 |
{ |
|
216 |
return qobject_to_qlist(qdict_get_obj(qdict, key, QTYPE_QLIST)); |
|
217 |
} |
|
218 |
|
|
219 |
/** |
|
207 | 220 |
* qdict_get_str(): Get a pointer to the stored string mapped |
208 | 221 |
* by 'key' |
209 | 222 |
* |
b/qdict.h | ||
---|---|---|
2 | 2 |
#define QDICT_H |
3 | 3 |
|
4 | 4 |
#include "qobject.h" |
5 |
#include "qlist.h" |
|
5 | 6 |
#include "qemu-queue.h" |
6 | 7 |
#include <stdint.h> |
7 | 8 |
|
... | ... | |
38 | 39 |
/* High level helpers */ |
39 | 40 |
int64_t qdict_get_int(const QDict *qdict, const char *key); |
40 | 41 |
int qdict_get_bool(const QDict *qdict, const char *key); |
42 |
QList *qdict_get_qlist(const QDict *qdict, const char *key); |
|
41 | 43 |
const char *qdict_get_str(const QDict *qdict, const char *key); |
42 | 44 |
int64_t qdict_get_try_int(const QDict *qdict, const char *key, |
43 | 45 |
int64_t err_value); |
Also available in: Unified diff