[Bf-committers] [Fwd: [Re: [Bf-blender-cvs] CVS commit: blender/intern/moto/include MT_assert.h blender/intern/moto/intern MT_Assert.cpp]]

Jacques Beaurain jacques.beaurain at gmail.com
Sun Jan 16 18:14:01 CET 2005


Hi,

This broke all kinds of things on Windows and possibly others too. 
(linking assert not being defined etc). Possibly others too. Sorry if 
you see this on a couple of ML's. I am onverting to GMail and my address 
books are confused (or baybe it is me ;). The assert macros on non-GNU 
Windows does exactly that for debug builds so please use the patch 
attached to revert this to the old behaviour. Remove the WIN32 check if 
it should only be !__GNUC__. There is more stuff broken from Kester's 
other submit. (C++ classes defined as structs. Members not returning 
pointers that should etc.)

May post a patch for that too soon, if I can get all the problems.

Kester Maddock wrote:

> kester (Kester Maddock) 2005/01/16 05:28:55 CET
>
>  Modified files:
>    blender/intern/moto/include MT_assert.h  Added files:
>    blender/intern/moto/intern MT_Assert.cpp  
>  Log:
>  Advanced MT_assert macro.
>  
>  It will attempt to break into the debugger instead of aborting the 
> program.  On Windows you have a nice MessageBox function, so you can 
> choose to break, ignore, or permanently ignore the assert.
>  
>  Revision  Changes    Path
>  1.8       +47 -3     blender/intern/moto/include/MT_assert.h
>    
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/intern/moto/include/MT_assert.h.diff?r1=1.7&r2=1.8&cvsroot=bf-blender> 
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-blender-cvs
>
>  
>

------------------------------------------------------------------------

Index: intern/moto/include/MT_assert.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/intern/moto/include/MT_assert.h,v
retrieving revision 1.8
diff -u -r1.8 MT_assert.h
--- intern/moto/include/MT_assert.h	16 Jan 2005 04:28:55 -0000	1.8
+++ intern/moto/include/MT_assert.h	16 Jan 2005 14:59:24 -0000
@@ -32,6 +32,13 @@
 #ifndef MT_ASSERT_H
 #define MT_ASSERT_H
 
+#if defined(WIN32) && !defined(__GNUC__)
+
+#include <assert.h>
+#define MT_assert(predicate) assert(predicate)
+
+#else /* defined(WIN32) && !defined(__GNUC__) */
+
 #ifdef	MT_NDEBUG
 
 #define MT_assert(predicate) ((void)0)
@@ -87,6 +94,8 @@
 }
 
 #endif /* MT_NDEBUG */
+
+#endif /* defined(WIN32) && !defined(__GNUC__) */
 
 #endif
 

-------------- next part --------------
Index: intern/moto/include/MT_assert.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/intern/moto/include/MT_assert.h,v
retrieving revision 1.8
diff -u -r1.8 MT_assert.h
--- intern/moto/include/MT_assert.h	16 Jan 2005 04:28:55 -0000	1.8
+++ intern/moto/include/MT_assert.h	16 Jan 2005 14:59:24 -0000
@@ -32,6 +32,13 @@
 #ifndef MT_ASSERT_H
 #define MT_ASSERT_H
 
+#if defined(WIN32) && !defined(__GNUC__)
+
+#include <assert.h>
+#define MT_assert(predicate) assert(predicate)
+
+#else /* defined(WIN32) && !defined(__GNUC__) */
+
 #ifdef	MT_NDEBUG
 
 #define MT_assert(predicate) ((void)0)
@@ -87,6 +94,8 @@
 }
 
 #endif /* MT_NDEBUG */
+
+#endif /* defined(WIN32) && !defined(__GNUC__) */
 
 #endif
 


More information about the Bf-committers mailing list