Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_debug.h 


Log Message:

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_debug.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_debug.h 10 Oct 2005 23:44:24 -0000      1.6
+++ ewl_debug.h 21 Oct 2005 22:08:35 -0000      1.7
@@ -110,6 +110,38 @@
                return ret; \
          } \
 }
+
+#define DCHECK_TYPE(str, ptr, type) \
+{ \
+       if (!ewl_widget_type_is(EWL_WIDGET(ptr), type)) \
+       { \
+               ewl_print_warning(); \
+               fprintf(stderr, "\tThis program is calling:\n\n" \
+                               "\t%s();\n\n" \
+                               "\tWith the paramter:\n\n" \
+                               "\t%s\n\n" \
+                               "\tas the wrong type. (%s) instead of (%s).\n" \
+                               "\tPlease fix your program.\n", \
+                               __FUNCTION__, str, 
EWL_WIDGET(ptr)->inheritance, type); \
+       } \
+}
+
+#define DCHECK_TYPE_RET(str, ptr, type, ret) \
+{ \
+       if (!ewl_widget_type_is(EWL_WIDGET(ptr), type)) \
+       { \
+               ewl_print_warning(); \
+               fprintf(stderr, "\tThis program is calling:\n\n" \
+                               "\t%s();\n\n" \
+                               "\tWith the paramter:\n\n" \
+                               "\t%s\n\n" \
+                               "\tas the wrong type. (%s) instead of (%s).\n" \
+                               "\tPlease fix your program.\n", \
+                               __FUNCTION__, str, 
EWL_WIDGET(ptr)->inheritance, type); \
+               return ret; \
+       } \
+}
+
 #else
 
 #define DENTER_FUNCTION(lvl) {}
@@ -125,13 +157,14 @@
                return; \
        } \
 }
-
 #define DCHECK_PARAM_PTR_RET(str, ptr, ret) \
 { \
        if (!ptr) { \
                return ret; \
        } \
 }
+#define DCHECK_TYPE(str, ptr, type) {}
+#define DCHECK_TYPE_RET(str, ptr, type, ret) {}
 #endif
 
 #define DERROR(fmt) \




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to