qlit: use QLit prefix consistently

Rename from LiteralQ to QLit.

Backports commit 082696e767db4d2b6c8c8c233d28291b83fc2b21 from qemu
This commit is contained in:
Marc-André Lureau 2018-03-07 17:10:21 -05:00 committed by Lioncash
parent c85b87fe06
commit a5d527ca72
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 14 additions and 14 deletions

View file

@ -17,33 +17,33 @@
#include "qapi-types.h"
#include "qobject.h"
typedef struct LiteralQDictEntry LiteralQDictEntry;
typedef struct LiteralQObject LiteralQObject;
typedef struct QLitDictEntry QLitDictEntry;
typedef struct QLitObject QLitObject;
struct LiteralQObject {
struct QLitObject {
int type;
union {
int64_t qnum;
const char *qstr;
LiteralQDictEntry *qdict;
LiteralQObject *qlist;
QLitDictEntry *qdict;
QLitObject *qlist;
} value;
};
struct LiteralQDictEntry {
struct QLitDictEntry {
const char *key;
LiteralQObject value;
QLitObject value;
};
#define QLIT_QNUM(val) \
(LiteralQObject){.type = QTYPE_QNUM, .value.qnum = (val)}
(QLitObject){.type = QTYPE_QNUM, .value.qnum = (val)}
#define QLIT_QSTR(val) \
(LiteralQObject){.type = QTYPE_QSTRING, .value.qstr = (val)}
(QLitObject){.type = QTYPE_QSTRING, .value.qstr = (val)}
#define QLIT_QDICT(val) \
(LiteralQObject){.type = QTYPE_QDICT, .value.qdict = (val)}
(QLitObject){.type = QTYPE_QDICT, .value.qdict = (val)}
#define QLIT_QLIST(val) \
(LiteralQObject){.type = QTYPE_QLIST, .value.qlist = (val)}
(QLitObject){.type = QTYPE_QLIST, .value.qlist = (val)}
int compare_litqobj_to_qobj(LiteralQObject *lhs, QObject *rhs);
int compare_litqobj_to_qobj(QLitObject *lhs, QObject *rhs);
#endif /* QLIT_H */

View file

@ -24,7 +24,7 @@
typedef struct QListCompareHelper {
int index;
LiteralQObject *objs;
QLitObject *objs;
int result;
} QListCompareHelper;
@ -45,7 +45,7 @@ static void compare_helper(QObject *obj, void *opaque)
compare_litqobj_to_qobj(&helper->objs[helper->index++], obj);
}
int compare_litqobj_to_qobj(LiteralQObject *lhs, QObject *rhs)
int compare_litqobj_to_qobj(QLitObject *lhs, QObject *rhs)
{
int64_t val;