aboutsummaryrefslogtreecommitdiff
path: root/include/qapi/qmp/qnum.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qapi/qmp/qnum.h')
-rw-r--r--include/qapi/qmp/qnum.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/qnum.h
index e42b136141..09d745c490 100644
--- a/include/qapi/qmp/qnum.h
+++ b/include/qapi/qmp/qnum.h
@@ -19,6 +19,7 @@
typedef enum {
QNUM_I64,
+ QNUM_U64,
QNUM_DOUBLE
} QNumKind;
@@ -27,15 +28,21 @@ typedef struct QNum {
QNumKind kind;
union {
int64_t i64;
+ uint64_t u64;
double dbl;
} u;
} QNum;
QNum *qnum_from_int(int64_t value);
+QNum *qnum_from_uint(uint64_t value);
QNum *qnum_from_double(double value);
bool qnum_get_try_int(const QNum *qn, int64_t *val);
int64_t qnum_get_int(const QNum *qn);
+
+bool qnum_get_try_uint(const QNum *qn, uint64_t *val);
+uint64_t qnum_get_uint(const QNum *qn);
+
double qnum_get_double(QNum *qn);
char *qnum_to_string(QNum *qn);