[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44173] branches/bmesh/blender/source/ blender/blenlib/BLI_array.h: fix for error found while looking into #30221

Campbell Barton ideasman42 at gmail.com
Fri Feb 17 01:09:01 CET 2012


Revision: 44173
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44173
Author:   campbellbarton
Date:     2012-02-17 00:08:52 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
fix for error found while looking into #30221

macro needed parentheses.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenlib/BLI_array.h

Modified: branches/bmesh/blender/source/blender/blenlib/BLI_array.h
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/BLI_array.h	2012-02-16 22:08:11 UTC (rev 44172)
+++ branches/bmesh/blender/source/blender/blenlib/BLI_array.h	2012-02-17 00:08:52 UTC (rev 44173)
@@ -177,11 +177,11 @@
  * same purpose as BLI_array_staticdeclare()
  * but use when the max size is known ahead of time */
 #define BLI_array_fixedstack_declare(arr, maxstatic, realsize, allocstr)      \
-	char _##arr##_static[maxstatic*sizeof(*arr)];                             \
+	char _##arr##_static[maxstatic*sizeof(*(arr))];                           \
 	const int _##arr##_is_static= ((void *)_##arr##_static) != (              \
-	    arr= (realsize <= maxstatic) ?                                        \
+	    arr= ((realsize) <= maxstatic) ?                                      \
 	        (void *)_##arr##_static :                                         \
-	        MEM_mallocN(sizeof(*arr)*realsize, allocstr)                      \
+	        MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr)                \
 	    )                                                                     \
 
 #define BLI_array_fixedstack_free(arr)                                        \




More information about the Bf-blender-cvs mailing list