mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-05-04 22:02:16 +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 "qapi-types.h"
|
||||||
#include "qobject.h"
|
#include "qobject.h"
|
||||||
|
|
||||||
typedef struct LiteralQDictEntry LiteralQDictEntry;
|
typedef struct QLitDictEntry QLitDictEntry;
|
||||||
typedef struct LiteralQObject LiteralQObject;
|
typedef struct QLitObject QLitObject;
|
||||||
|
|
||||||
struct LiteralQObject {
|
struct QLitObject {
|
||||||
int type;
|
int type;
|
||||||
union {
|
union {
|
||||||
int64_t qnum;
|
int64_t qnum;
|
||||||
const char *qstr;
|
const char *qstr;
|
||||||
LiteralQDictEntry *qdict;
|
QLitDictEntry *qdict;
|
||||||
LiteralQObject *qlist;
|
QLitObject *qlist;
|
||||||
} value;
|
} value;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LiteralQDictEntry {
|
struct QLitDictEntry {
|
||||||
const char *key;
|
const char *key;
|
||||||
LiteralQObject value;
|
QLitObject value;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QLIT_QNUM(val) \
|
#define QLIT_QNUM(val) \
|
||||||
(LiteralQObject){.type = QTYPE_QNUM, .value.qnum = (val)}
|
(QLitObject){.type = QTYPE_QNUM, .value.qnum = (val)}
|
||||||
#define QLIT_QSTR(val) \
|
#define QLIT_QSTR(val) \
|
||||||
(LiteralQObject){.type = QTYPE_QSTRING, .value.qstr = (val)}
|
(QLitObject){.type = QTYPE_QSTRING, .value.qstr = (val)}
|
||||||
#define QLIT_QDICT(val) \
|
#define QLIT_QDICT(val) \
|
||||||
(LiteralQObject){.type = QTYPE_QDICT, .value.qdict = (val)}
|
(QLitObject){.type = QTYPE_QDICT, .value.qdict = (val)}
|
||||||
#define QLIT_QLIST(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 */
|
#endif /* QLIT_H */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
typedef struct QListCompareHelper {
|
typedef struct QListCompareHelper {
|
||||||
int index;
|
int index;
|
||||||
LiteralQObject *objs;
|
QLitObject *objs;
|
||||||
int result;
|
int result;
|
||||||
} QListCompareHelper;
|
} QListCompareHelper;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ static void compare_helper(QObject *obj, void *opaque)
|
||||||
compare_litqobj_to_qobj(&helper->objs[helper->index++], obj);
|
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;
|
int64_t val;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue