mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 23:28:54 +02:00
Fix the non-gcc-3.x definitions of G_LIKELY and G_UNLIKELY. (Reported by
* glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY and G_UNLIKELY. (Reported by Dan Mills)
This commit is contained in:
@@ -225,10 +225,29 @@
|
||||
#define G_LIKELY(expr) __builtin_expect (_G_BOOLEAN_EXPR(expr), 1)
|
||||
#define G_UNLIKELY(expr) __builtin_expect (_G_BOOLEAN_EXPR(expr), 0)
|
||||
#else
|
||||
#define G_LIKELY(expr) expr
|
||||
#define G_UNLIKELY(expr) expr
|
||||
#define G_LIKELY(expr) (expr)
|
||||
#define G_UNLIKELY(expr) (expr)
|
||||
#endif
|
||||
|
||||
#endif /* __G_MACROS_H__ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user