mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
gtypes: add g-i annotations for G_MININT macros. Fixes #1673
They were changed in 6a2cfde2
to reuse the G_MAXINT values but
parsing nexted macros is currently broken in g-i and results in wrong
values.
Add value annotations for g-i to override the values.
This also moves the annotations to the macro definitions to have
everything g-i uses in one place.
This commit is contained in:
parent
66f3016026
commit
0cf55f4fd9
30
glib/docs.c
30
glib/docs.c
@ -208,14 +208,6 @@
|
||||
* #G_MAXINT8 (= 127).
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MININT8:
|
||||
*
|
||||
* The minimum value which can be held in a #gint8.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MAXINT8:
|
||||
*
|
||||
@ -250,14 +242,6 @@
|
||||
* %G_GINT16_MODIFIER and/or %G_GINT16_FORMAT.
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MININT16:
|
||||
*
|
||||
* The minimum value which can be held in a #gint16.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MAXINT16:
|
||||
*
|
||||
@ -337,14 +321,6 @@
|
||||
* %G_GINT32_MODIFIER and/or %G_GINT32_FORMAT.
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MININT32:
|
||||
*
|
||||
* The minimum value which can be held in a #gint32.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MAXINT32:
|
||||
*
|
||||
@ -407,12 +383,6 @@
|
||||
* %G_GINT64_MODIFIER and/or %G_GINT64_FORMAT.
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MININT64:
|
||||
*
|
||||
* The minimum value which can be held in a #gint64.
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_MAXINT64:
|
||||
*
|
||||
|
@ -58,18 +58,44 @@ typedef float gfloat;
|
||||
typedef double gdouble;
|
||||
|
||||
/* Define min and max constants for the fixed size numerical types */
|
||||
/**
|
||||
* G_MININT8: (value -128)
|
||||
*
|
||||
* The minimum value which can be held in a #gint8.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
#define G_MININT8 ((gint8) (-G_MAXINT8 - 1))
|
||||
#define G_MAXINT8 ((gint8) 0x7f)
|
||||
#define G_MAXUINT8 ((guint8) 0xff)
|
||||
|
||||
/**
|
||||
* G_MININT16: (value -32768)
|
||||
*
|
||||
* The minimum value which can be held in a #gint16.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
#define G_MININT16 ((gint16) (-G_MAXINT16 - 1))
|
||||
#define G_MAXINT16 ((gint16) 0x7fff)
|
||||
#define G_MAXUINT16 ((guint16) 0xffff)
|
||||
|
||||
/**
|
||||
* G_MININT32: (value -2147483648)
|
||||
*
|
||||
* The minimum value which can be held in a #gint32.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
#define G_MININT32 ((gint32) (-G_MAXINT32 - 1))
|
||||
#define G_MAXINT32 ((gint32) 0x7fffffff)
|
||||
#define G_MAXUINT32 ((guint32) 0xffffffff)
|
||||
|
||||
/**
|
||||
* G_MININT64: (value -9223372036854775808)
|
||||
*
|
||||
* The minimum value which can be held in a #gint64.
|
||||
*/
|
||||
#define G_MININT64 ((gint64) (-G_MAXINT64 - G_GINT64_CONSTANT(1)))
|
||||
#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
|
||||
#define G_MAXUINT64 G_GUINT64_CONSTANT(0xffffffffffffffff)
|
||||
|
Loading…
Reference in New Issue
Block a user