mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 18:40:58 +01:00
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
This commit is contained in:
parent
01baf39685
commit
05aafe2cff
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user