From 6b8d1ece705752cb0214fb89ccd3925eddc62df8 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 28 Aug 2009 15:27:05 -0300 Subject: Introduce QInt QInt is a high-level data type that can be used to represent integers, internally it stores an int64_t value. The following functions are available: - qint_from_int() Create a new QInt - qint_get_int() Get the stored integer Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- qint.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 qint.h (limited to 'qint.h') diff --git a/qint.h b/qint.h new file mode 100644 index 0000000000..672b32196c --- /dev/null +++ b/qint.h @@ -0,0 +1,16 @@ +#ifndef QINT_H +#define QINT_H + +#include +#include "qobject.h" + +typedef struct QInt { + QObject_HEAD; + int64_t value; +} QInt; + +QInt *qint_from_int(int64_t value); +int64_t qint_get_int(const QInt *qi); +QInt *qobject_to_qint(const QObject *obj); + +#endif /* QINT_H */ -- cgit v1.2.1