mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 11:27:00 +00:00
Typedef the subtypes of QObject in qemu/typedefs.h, too
This renders many inclusions of qapi/qmp/q*.h superfluous. They'll be dropped in the next few commits. Backports commit 9f5c734d591e26186a71f9e36d752f4798df3672 from qemu
This commit is contained in:
parent
5d554fefeb
commit
bbc9bcbb44
|
@ -17,10 +17,10 @@
|
|||
#include "unicorn/platform.h"
|
||||
#include "qapi/qmp/qobject.h"
|
||||
|
||||
typedef struct QBool {
|
||||
struct QBool {
|
||||
QObject_HEAD;
|
||||
bool value;
|
||||
} QBool;
|
||||
};
|
||||
|
||||
QBool *qbool_from_bool(bool value);
|
||||
bool qbool_get_bool(const QBool *qb);
|
||||
|
|
|
@ -27,11 +27,11 @@ typedef struct QDictEntry {
|
|||
QLIST_ENTRY(QDictEntry) next;
|
||||
} QDictEntry;
|
||||
|
||||
typedef struct QDict {
|
||||
struct QDict {
|
||||
QObject_HEAD;
|
||||
size_t size;
|
||||
QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX];
|
||||
} QDict;
|
||||
};
|
||||
|
||||
/* Object API */
|
||||
QDict *qdict_new(void);
|
||||
|
|
|
@ -22,10 +22,10 @@ typedef struct QListEntry {
|
|||
QTAILQ_ENTRY(QListEntry) next;
|
||||
} QListEntry;
|
||||
|
||||
typedef struct QList {
|
||||
struct QList {
|
||||
QObject_HEAD;
|
||||
QTAILQ_HEAD(,QListEntry) head;
|
||||
} QList;
|
||||
};
|
||||
|
||||
#define qlist_append(qlist, obj) \
|
||||
qlist_append_obj(qlist, QOBJECT(obj))
|
||||
|
|
|
@ -23,7 +23,7 @@ typedef enum {
|
|||
QNUM_DOUBLE
|
||||
} QNumKind;
|
||||
|
||||
typedef struct QNum {
|
||||
struct QNum {
|
||||
QObject base;
|
||||
QNumKind kind;
|
||||
union {
|
||||
|
@ -31,7 +31,7 @@ typedef struct QNum {
|
|||
uint64_t u64;
|
||||
double dbl;
|
||||
} u;
|
||||
} QNum;
|
||||
};
|
||||
|
||||
QNum *qnum_from_int(int64_t value);
|
||||
QNum *qnum_from_uint(uint64_t value);
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
#include "unicorn/platform.h"
|
||||
#include "qapi/qmp/qobject.h"
|
||||
|
||||
typedef struct QString {
|
||||
struct QString {
|
||||
QObject_HEAD;
|
||||
char *string;
|
||||
size_t length;
|
||||
size_t capacity;
|
||||
} QString;
|
||||
};
|
||||
|
||||
QString *qstring_new(void);
|
||||
QString *qstring_from_str(const char *str);
|
||||
|
|
|
@ -69,7 +69,12 @@ typedef struct QEMUSizedBuffer QEMUSizedBuffer;
|
|||
typedef struct QEMUTimer QEMUTimer;
|
||||
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
|
||||
typedef struct QemuConsole QemuConsole;
|
||||
typedef struct QBool QBool;
|
||||
typedef struct QDict QDict;
|
||||
typedef struct QList QList;
|
||||
typedef struct QNum QNum;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QString QString;
|
||||
typedef struct RAMBlock RAMBlock;
|
||||
typedef struct Range Range;
|
||||
typedef struct SHPCDevice SHPCDevice;
|
||||
|
|
Loading…
Reference in a new issue