Eina magic: add EINA_LIKELY.

This should improve performance as we use magic checks everywhere and it
lets the compiler do better optimisations.

SVN revision: 76113
This commit is contained in:
Tom Hacohen 2012-09-04 08:00:27 +00:00
parent 52447357b6
commit 89413ab06e
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ EAPI extern Eina_Error EINA_ERROR_MAGIC_FAILED;
* If the magic feature of Eina is disabled, #EINA_MAGIC_CHECK is just
* the value @c 1.
*/
#define EINA_MAGIC_CHECK(d, m) ((d) && ((d)->__magic == (m)))
#define EINA_MAGIC_CHECK(d, m) (EINA_LIKELY((d) && ((d)->__magic == (m))))
/**
* @def EINA_MAGIC_FAIL(d, m)