discomfitor pushed a commit to branch master.
commit 3a7a769edc3d368986b1cd30e21e8151f6b47c35
Author: Mike Blumenkrantz <[email protected]>
Date: Tue Jun 25 08:59:44 2013 +0100
improve BD_CHANGED macro to abort in debug mode
---
src/bin/e_border.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index e619428..de62ab9 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -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
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev