improve BD_CHANGED macro to abort in debug mode

This commit is contained in:
Mike Blumenkrantz 2013-06-25 08:59:44 +01:00
parent 18a585df48
commit 3a7a769edc
1 changed files with 7 additions and 1 deletions

View File

@ -858,7 +858,13 @@ e_border_inset_height_get(const E_Border *bd)
/* macro for finding misuse of changed flag */
#if 0
# define BD_CHANGED(BD) BD->changed = 1; INF("%s:%d - BD CHANGED: %p", __FILE__, __LINE__, BD)
# define BD_CHANGED(BD) \
do { \
if (e_object_is_del(E_OBJECT(BD))) \
EINA_LOG_CRIT("CHANGED SET ON DELETED BORDER!"); \
BD->changed = 1; \
INF("%s:%d - BD CHANGED: %p", __FILE__, __LINE__, BD); \
} while (0)
#else
# define BD_CHANGED(BD) BD->changed = 1
#endif