Only use G_LIKELY in g_assert() and g_return_[val]_if_fail() if it is

* glib/gmessages.h: Only use G_LIKELY in g_assert() and
	g_return_[val]_if_fail() if it is actually doing something.
This commit is contained in:
Matthias Clasen 2002-11-26 19:48:52 +00:00
parent 4d059644f5
commit 37078e206c
8 changed files with 37 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -1,3 +1,8 @@
2002-11-26 Matthias Clasen <maclas@gmx.de>
* glib/gmessages.h: Only use G_LIKELY in g_assert() and
g_return_[val]_if_fail() if it is actually doing something.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:

View File

@ -198,7 +198,7 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
#else /* !G_DISABLE_ASSERT */
#ifdef __GNUC__
#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
#define g_assert(expr) G_STMT_START{ \
if (!G_LIKELY (expr)) \
@ -250,7 +250,7 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
#else /* !G_DISABLE_CHECKS */
#ifdef __GNUC__
#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
#define g_return_if_fail(expr) G_STMT_START{ \
if (!G_LIKELY (expr)) \