mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
gtypes.h: move G_STATIC_ASSERT to function scope
It seems that some compilers get upset if this is done at global scope, so let's move it to function scope where we know it works.
This commit is contained in:
parent
a266ac62ea
commit
ec6971b864
@ -419,8 +419,8 @@ static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32
|
||||
static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) {
|
||||
return !__builtin_umul_overflow(a, b, dest); }
|
||||
static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) {
|
||||
return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); }
|
||||
G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
|
||||
return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); }
|
||||
static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) {
|
||||
return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); }
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user