[glib] gtypes.h: Make G_MININTn literals negative
- From: Mikhail Zabaluev <mzabaluev src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtypes.h: Make G_MININTn literals negative
- Date: Thu, 15 Oct 2015 20:48:22 +0000 (UTC)
commit 05aafe2cff5aab63c6c8d51261549b395f54bca6
Author: Mikhail Zabaluev <mikhail zabaluev gmail com>
Date: Wed Oct 14 08:10:38 2015 +0300
gtypes.h: Make G_MININTn literals negative
This is more friendly to the GIR scanner; with previous definitions,
the constant values end up out of range for their stated integer type.
https://bugzilla.gnome.org/show_bug.cgi?id=756550
glib/gtypes.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/gtypes.h b/glib/gtypes.h
index 0e73b40..5b7a95e 100644
--- a/glib/gtypes.h
+++ b/glib/gtypes.h
@@ -58,19 +58,19 @@ typedef float gfloat;
typedef double gdouble;
/* Define min and max constants for the fixed size numerical types */
-#define G_MININT8 ((gint8) 0x80)
+#define G_MININT8 ((gint8) -0x80)
#define G_MAXINT8 ((gint8) 0x7f)
#define G_MAXUINT8 ((guint8) 0xff)
-#define G_MININT16 ((gint16) 0x8000)
+#define G_MININT16 ((gint16) -0x8000)
#define G_MAXINT16 ((gint16) 0x7fff)
#define G_MAXUINT16 ((guint16) 0xffff)
-#define G_MININT32 ((gint32) 0x80000000)
+#define G_MININT32 ((gint32) -0x80000000)
#define G_MAXINT32 ((gint32) 0x7fffffff)
#define G_MAXUINT32 ((guint32) 0xffffffff)
-#define G_MININT64 ((gint64) G_GINT64_CONSTANT(0x8000000000000000))
+#define G_MININT64 ((gint64) G_GINT64_CONSTANT(-0x8000000000000000))
#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
#define G_MAXUINT64 G_GINT64_CONSTANT(0xffffffffffffffffU)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]