mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 12:55:29 +00:00
qlit: use QLit prefix consistently
Rename from LiteralQ to QLit. Backports commit 082696e767db4d2b6c8c8c233d28291b83fc2b21 from qemu
This commit is contained in:
parent
c85b87fe06
commit
a5d527ca72
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue